diff --git a/Test/RuntimeTest.m b/Test/RuntimeTest.m index 88ac5d0..d798e15 100644 --- a/Test/RuntimeTest.m +++ b/Test/RuntimeTest.m @@ -29,6 +29,7 @@ static int stringsEqual(const char *a, const char *b) - (int) manyTypes; - (void) synchronizedCode; + (void) synchronizedCode; ++ (id) shared; - (BOOL) basicThrowAndCatchException; @end @@ -62,6 +63,11 @@ static int stringsEqual(const char *a, const char *b) { @synchronized(self) { } } ++ (id) shared +{ + @synchronized(self) { } + return nil; +} - (void) throwException { @throw [NSException exceptionWithName: @"RuntimeTestException" reason: @"" userInfo: nil]; @@ -214,6 +220,7 @@ void testSynchronized() printf("Enter synchronized code\n"); [foo synchronizedCode]; [foo release]; + [Foo shared]; printf("testSynchronized() ran\n"); }