ObjFW  Check-in [a417f307de]

Overview
Comment:Fix tests/objc_sync.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a417f307de7fe36230bc44f467fa87dd2ae876ef9dd338cd5ac14c6ef713b80f
User & Date: js on 2012-07-20 14:53:09
Other Links: manifest | tags
Context
2012-07-20
17:15
Sign binaries before uploading to iOS device. check-in: d02c5ae007 user: js tags: trunk
14:53
Fix tests/objc_sync. check-in: a417f307de user: js tags: trunk
14:17
Blocks need to be copied, not retained. check-in: ddcfab2b93 user: js tags: trunk
Changes

Modified tests/objc_sync/Makefile from [8a0c1d85a0] to [39ae0b3744].

18
19
20
21
22
23
24
25
26
27
	DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
	${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \
	rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \
	exit $$EXIT

include ../../buildsys.mk

CPPFLAGS += -I../../src -I../..
LIBS := -L../../src -lobjfw ${LIBS}
LD = ${OBJC}







|


18
19
20
21
22
23
24
25
26
27
	DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
	${TEST_LAUNCHER} ./${PROG_NOINST}; EXIT=$$?; \
	rm -f libobjfw.so.0 libobjfw.so.0.1 libobjfw.dll libobjfw.dylib; \
	exit $$EXIT

include ../../buildsys.mk

CPPFLAGS += -I../../src/runtime -I../../src -I../..
LIBS := -L../../src -lobjfw ${LIBS}
LD = ${OBJC}

Modified tests/objc_sync/test.m from [9a857888a8] to [31a5c0c206].

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@interface MyThread: OFThread
- main;
@end

@implementation MyThread
- main
{
	printf("[%s] Entering #1\n", [object cString]);
	@synchronized (lock) {
		printf("[%s] Entering #2\n", [object cString]);
		@synchronized (lock) {
			printf("[%s] Hello!\n", [object cString]);
		}
		printf("[%s] Left #2\n", [object cString]);
	}
	printf("[%s] Left #1\n", [object cString]);

	return nil;
}
@end

int
main()







|

|

|

|

|







26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@interface MyThread: OFThread
- main;
@end

@implementation MyThread
- main
{
	printf("[%s] Entering #1\n", [object UTF8String]);
	@synchronized (lock) {
		printf("[%s] Entering #2\n", [object UTF8String]);
		@synchronized (lock) {
			printf("[%s] Hello!\n", [object UTF8String]);
		}
		printf("[%s] Left #2\n", [object UTF8String]);
	}
	printf("[%s] Left #1\n", [object UTF8String]);

	return nil;
}
@end

int
main()