home *** CD-ROM | disk | FTP | other *** search
- //
- // StringTestDebugging.m -- test out the String class' Debugging category
- // Written by Don Yacktman (c) 1994 by Don Yacktman.
- // Version 1.0. All rights reserved.
- //
- // This notice may not be removed from this source code.
- //
- // This program is included in the MiscKit by permission from the author
- // and its use is governed by the MiscKit license, found in the file
- // "LICENSE.rtf" in the MiscKit distribution. Please refer to that file
- // for a list of all applicable permissions and restrictions.
- //
-
- #define DSTRINGS 3
- void testMiscStringDebugging()
- {
- id string[DSTRINGS]; int i;
- printf("***** Testing MiscStringDebugging category\n");
-
- // Test MiscStringDebugging.m methods:
- string[0] = [MiscString newWithString:""];
- string[1] = [[MiscString alloc] init];
- string[2] = [MiscString newWithString:"A test string."];
-
- for (i=0; i<DSTRINGS; i++) {
- [string[i] printToStdErr:"Debug:"];
- // this exercises buildInstanceImageIn: as well.
- [string[i] free];
- }
- }
-
- // Note that we don't test -printForDebugger:! We'll assume it works OK.
-