ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Examples/MiscString/StringTestDebugging.m

This is StringTestDebugging.m in view mode; [Download] [Up]

//
// StringTestDebugging.m -- test out the String class' Debugging category
//		Written by Don Yacktman Copyright (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.

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.