home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Programming / c-runtime / tests / RCS / SubClass1.m,v < prev    next >
Encoding:
Text File  |  1992-08-18  |  903 b   |  85 lines

  1. head    1.1;
  2. access;
  3. symbols;
  4. locks
  5.     dglattin:1.1; strict;
  6. comment    @# @;
  7.  
  8.  
  9. 1.1
  10. date    92.08.18.04.58.04;    author dglattin;    state Exp;
  11. branches;
  12. next    ;
  13.  
  14.  
  15. desc
  16. @test code.
  17. @
  18.  
  19.  
  20. 1.1
  21. log
  22. @Initial revision
  23. @
  24. text
  25. @#include  <assert.h>
  26. #include  <stdio.h>
  27. #include  <SubClass1.h>
  28.  
  29.  
  30.         static BOOL     flag = NO;
  31.  
  32.  
  33. @@implementation SubClass1
  34.  
  35.  
  36. + initialize {
  37.  
  38.   printf( "If you see this message then SubClass1 received a"
  39.     " +initialize method\n" );
  40.   flag = YES;
  41.  
  42.   return self;
  43. }
  44.  
  45.  
  46. + newOther {
  47.  
  48.         assert (flag);
  49.   self = [ self new ];
  50.   return self;
  51. }
  52.  
  53. - hokeyMethod {
  54.  
  55.  
  56.   return self;
  57. }
  58.  
  59.  
  60. - print {
  61.  
  62.  
  63.   printf( "Subclass1 print\n" );
  64.   
  65.   return self;
  66. }
  67.  
  68.  
  69. - print:( const char* )aPhrase {
  70.  
  71.  
  72.   printf( "Subclass1 print:%s\n", aPhrase );
  73.   
  74.   return self;
  75. }
  76.  
  77.  
  78. + ( int )return12 { return 12; }
  79. - ( int )return15 { return 15; }
  80. - ( int )return24 { return 24; }
  81. - ( int )return33 { return 33; }
  82.  
  83.  
  84. @@end@
  85.