home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1994 June / NEBULA_SE.ISO / SourceCode / MiscKit / Examples / MiscString / StringTestDebugging.m < prev    next >
Encoding:
Text File  |  1994-01-26  |  1.0 KB  |  33 lines

  1. //
  2. // StringTestDebugging.m -- test out the String class' Debugging category
  3. //        Written by Don Yacktman (c) 1994 by Don Yacktman.
  4. //                Version 1.0.  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This program is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. #define DSTRINGS 3
  15. void testMiscStringDebugging()
  16. {
  17.     id string[DSTRINGS]; int i;
  18.     printf("***** Testing MiscStringDebugging category\n");
  19.  
  20. // Test MiscStringDebugging.m methods:
  21.     string[0] = [MiscString newWithString:""];
  22.     string[1] = [[MiscString alloc] init];
  23.     string[2] = [MiscString newWithString:"A test string."];
  24.  
  25.     for (i=0; i<DSTRINGS; i++) {
  26.         [string[i] printToStdErr:"Debug:"];
  27.             // this exercises buildInstanceImageIn: as well.
  28.         [string[i] free];
  29.     }
  30. }
  31.  
  32. // Note that we don't test -printForDebugger:!  We'll assume it works OK.
  33.