aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMSenTestCaseTest.m
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan <dmaclach@gmail.com>2019-05-20 11:14:31 -0700
committerGravatar Thomas Van Lenten <thomasvl@google.com>2019-05-20 15:25:46 -0400
commit80704a61eab151018384000d4e83f7f512ee55f5 (patch)
tree5066a3de5840d57a7a89f359bc3b74f9e507a1a2 /UnitTesting/GTMSenTestCaseTest.m
parent6aa93248c389686805fbbc8260580f9fbeb3cb95 (diff)
Add XCTAssertAsserts
XCTAssertAsserts is for testing if NSAssert or NSParameterAssert is called. It is a no-op if NS_BLOCK_ASSERTIONS is defined. Update project to match "Xcode" standard with regards to having assertions off in release.
Diffstat (limited to 'UnitTesting/GTMSenTestCaseTest.m')
-rw-r--r--UnitTesting/GTMSenTestCaseTest.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/UnitTesting/GTMSenTestCaseTest.m b/UnitTesting/GTMSenTestCaseTest.m
index 33055ad..edaa180 100644
--- a/UnitTesting/GTMSenTestCaseTest.m
+++ b/UnitTesting/GTMSenTestCaseTest.m
@@ -80,3 +80,18 @@ static int gZzCheckCalls_ = 0;
}
@end
+
+@interface GTMSenTestCase : GTMTestCase
+@end
+
+@implementation GTMSenTestCase
+- (void)funcThatAsserts {
+ NSAssert(nil, @"Should be nil");
+}
+
+- (void)testXCTAssertAsserts {
+ XCTAssertAsserts([self funcThatAsserts]);
+}
+
+@end
+