Question

I have the following test:

Header:

#import <SenTestingKit/SenTestingKit.h>

@interface MyTest : SenTestCase
- (void)testFoo;
@end

Implementation:

@implementation MyTest

- (void)testFoo {
    NSString* foo = nil;
    NSDictionary* bar = @{@"bar": foo};

    STFail(@"this is not failing");
}

@end

When I run testFoo, the test shows as being successful, even though it's actually crashing. (NSDictionary throws an exception because I'm trying to insert a nil value.)

If I enclose the NSDictionary line in a @try / @catch block, then the test fails as expected.

Anyone knows what to do?

(Using Xcode 5)

Was it helpful?

Solution

Never mind, this is a known issue from SenTestingKitAsync, not SenTestingKit:

https://github.com/nxtbgthng/SenTestingKitAsync/issues/5

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top