mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Added toString overload for chars
(and, by extension, Obj-C's BOOL)
This commit is contained in:
@@ -42,6 +42,12 @@ OC_TEST_CASE( "OCTest/test2", "This is another test case" )
|
||||
REQUIRE( obj.int_val == 2 );
|
||||
}
|
||||
|
||||
OC_TEST_CASE( "OCTest/BOOL", "tests a boolean value" )
|
||||
{
|
||||
CHECK( [obj isTrue] == NO );
|
||||
CHECK( [obj isFalse] == YES );
|
||||
}
|
||||
|
||||
OC_TEST_CASE( "OCTest/throws/objc", "throws an Objective-C exception" )
|
||||
{
|
||||
@throw [[NSException alloc] initWithName: NSGenericException
|
||||
|
@@ -16,6 +16,9 @@
|
||||
int int_val;
|
||||
}
|
||||
|
||||
-(BOOL) isTrue;
|
||||
-(BOOL) isFalse;
|
||||
|
||||
@property (nonatomic, assign ) int int_val;
|
||||
|
||||
@end
|
||||
|
@@ -15,4 +15,11 @@
|
||||
|
||||
@synthesize int_val;
|
||||
|
||||
-(BOOL) isTrue {
|
||||
return YES;
|
||||
}
|
||||
-(BOOL) isFalse {
|
||||
return NO;
|
||||
}
|
||||
|
||||
@end
|
||||
|
Reference in New Issue
Block a user