Added initial built-in matchers for NSString (ObjC)

This commit is contained in:
Phil Nash
2012-03-04 21:18:46 +00:00
parent a6a40b3ba9
commit 966f5dbff2
4 changed files with 122 additions and 36 deletions

View File

@@ -42,4 +42,12 @@ OC_TEST_CASE( "OCTest/test2", "This is another test case" )
REQUIRE( obj.int_val == 2 );
}
using namespace Catch::Matchers;
OC_TEST_CASE( "OCTest/matchers", "Matches work with OC types (NSString so far)" )
{
REQUIRE_THAT( @"This is a string", Contains( @"is a" ) );
REQUIRE_THAT( @"This is a string", StartsWith( @"This" ) );
REQUIRE_THAT( @"This is a string", EndsWith( @"string" ) );
}
@end