ObjFW  Diff

Differences From Artifact [e6e690b436]:

To Artifact [fbe6e29fea]:


48
49
50
51
52
53
54

55
56
57
58
59
60
61
62
63
64
65

@implementation TestsAppDelegate (PropertiesTests)
- (void)propertiesTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	PropertiesTest *pt = [[[PropertiesTest alloc] init] autorelease];
	OFString *t = [OFMutableString stringWithString: @"foo"];


	[pt setFoo: t];
	TEST(@"copy, nonatomic", [[pt foo] isEqual: @"foo"] &&
	    [pt foo] != @"foo" && [[pt foo] retainCount] == 1)

	[pt setBar: t];
	TEST(@"retain, atomic", [pt bar] == t && [t retainCount] == 3)

	[pool drain];
}
@end







>


|
|







48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

@implementation TestsAppDelegate (PropertiesTests)
- (void)propertiesTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	PropertiesTest *pt = [[[PropertiesTest alloc] init] autorelease];
	OFString *t = [OFMutableString stringWithString: @"foo"];
	OFString *foo = @"foo";

	[pt setFoo: t];
	TEST(@"copy, nonatomic", [[pt foo] isEqual: foo] &&
	    [pt foo] != foo && [[pt foo] retainCount] == 1)

	[pt setBar: t];
	TEST(@"retain, atomic", [pt bar] == t && [t retainCount] == 3)

	[pool drain];
}
@end