ObjFW  Check-in [5b8ab2c427]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Adjust OFObject test to recent change to -[freeMemory:].
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5b8ab2c427f559c046daf989e2be78c6f9195b1876d5410cb6371c9862965351
User & Date: js 2009-12-01 13:28:28.000
Context
2009-12-01
13:35
Better checking which runtime we use. check-in: 240b72cd71 user: js tags: trunk
13:28
Adjust OFObject test to recent change to -[freeMemory:]. check-in: 5b8ab2c427 user: js tags: trunk
13:27
Add missing LD = ${OBJC} to two Makefiles. check-in: 4b763dd49a user: js tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to tests/OFObject.m.
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
object_tests()
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFObject *obj = [[[OFObject alloc] init] autorelease];
	void *p, *q, *r;

	EXPECT_EXCEPTION(@"Detect freeing of memory not allocated by object",
	    OFMemoryNotPartOfObjectException, [obj freeMemory: NULL])

	TEST(@"Allocating 4096 bytes",
	    (p = [obj allocMemoryWithSize: 4096]) != NULL)

	TEST(@"Freeing memory", [obj freeMemory: p])

	EXPECT_EXCEPTION(@"Detect freeing of memory twice",







|







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
object_tests()
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFObject *obj = [[[OFObject alloc] init] autorelease];
	void *p, *q, *r;

	EXPECT_EXCEPTION(@"Detect freeing of memory not allocated by object",
	    OFMemoryNotPartOfObjectException, [obj freeMemory: (void*)1])

	TEST(@"Allocating 4096 bytes",
	    (p = [obj allocMemoryWithSize: 4096]) != NULL)

	TEST(@"Freeing memory", [obj freeMemory: p])

	EXPECT_EXCEPTION(@"Detect freeing of memory twice",