Skip to content

Instantly share code, notes, and snippets.

@lzwjava
Created December 8, 2015 10:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lzwjava/fa18a6592655d8a66e7f to your computer and use it in GitHub Desktop.
Save lzwjava/fa18a6592655d8a66e7f to your computer and use it in GitHub Desktop.
#define assertTrue(expr) XCTAssertTrue((expr), @"")
#define assertFalse(expr) XCTAssertFalse((expr), @"")
#define assertNil(a1) XCTAssertNil((a1), @"")
#define assertNotNil(a1) XCTAssertNotNil((a1), @"")
#define assertEqual(a1, a2) XCTAssertEqual((a1), (a2), @"")
#define assertEqualObjects(a1, a2) XCTAssertEqualObjects((a1), (a2), @"")
#define assertNotEqual(a1, a2) XCTAssertNotEqual((a1), (a2), @"")
#define assertNotEqualObjects(a1, a2) XCTAssertNotEqualObjects((a1), (a2), @"")
#define assertAccuracy(a1, a2, acc) XCTAssertEqualWithAccuracy((a1),(a2),(acc))
#define WAIT \
do { \
[self expectationForNotification:@"LCUnitTest" object:nil handler:nil]; \
[self waitForExpectationsWithTimeout:60 handler:nil]; \
} while(0);
#define NOTIFY \
do { \
[[NSNotificationCenter defaultCenter] postNotificationName:@"LCUnitTest" object:nil]; \
} while(0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment