Fixes nil NSString issue reported in #159

This commit is contained in:
Phil Nash
2013-03-12 18:49:22 +00:00
parent 17479c6e49
commit 32e70b2235
2 changed files with 9 additions and 0 deletions

View File

@@ -74,4 +74,9 @@ OC_TEST_CASE( "OCTest/matchers", "Matches work with OC types (NSString so far)"
REQUIRE_THAT( @"This is a string", EndsWith( @"string" ) );
}
OC_TEST_CASE( "OCTest/matchers/nil", "nil NSString should not crash the test" )
{
REQUIRE_THAT( (NSString*)nil, Equals( @"This should fail, but not crash" ) );
}
@end