One of the unit tests expected an exception to be raised when working with
objects that don't respond to the retain and release methods, but in a garbage
collected world these messages become no-ops (and in fact I believe that the
compiler literally optimizes them away to nothing).
As such, no exception was being raised and there is no way to "fix" either the
test or the tested implementation: it's simply that the test no longer makes
sense in the context of garbage collection. This commit removes the
now-redundant test.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
WO_TEST_DOES_NOT_THROW([stub raising:@"foo"]);
WO_TEST_THROWS([stub raising:@"bar"]);
- // should raise if raising: passed an object that does not respond to
- // retain, release or autorelease
- WOLightweightRoot *root = [WOLightweightRoot newLightweightRoot];
- stub = [WOObjectStub stubForClass:[NSString class] withDelegate:nil];
- WO_TEST_THROWS([stub raising:root]);
- [root dealloc];
-
// should raise expected exception
mock = [WOObjectMock mockForClass:[NSString class]];
[[[mock accept] raising:exception] lowercaseString];