@@ -24,10 +24,14 @@ ## __VA_ARGS__, nil) #define OTAssertTrue(cond, ...) OTAssert(cond == true, ## __VA_ARGS__) #define OTAssertFalse(cond, ...) OTAssert(cond == false, ## __VA_ARGS__) #define OTAssertEqual(a, b, ...) OTAssert(a == b, ## __VA_ARGS__) #define OTAssertNotEqual(a, b, ...) OTAssert(a != b, ## __VA_ARGS__) +#define OTAssertLessThan(a, b, ...) OTAssert(a < b, ## __VA_ARGS__) +#define OTAssertLessThanOrEqual(a, b, ...) OTAssert(a <= b, ## __VA_ARGS__) +#define OTAssertGreaterThan(a, b, ...) OTAssert(a > b, ## __VA_ARGS__) +#define OTAssertGreaterThanOrEqual(a, b, ...) OTAssert(a >= b, ## __VA_ARGS__) #define OTAssertEqualObjects(a, b, ...) OTAssert([a isEqual: b], ## __VA_ARGS__) #define OTAssertNotEqualObjects(a, b, ...) \ OTAssert(![a isEqual: b], ## __VA_ARGS__) #define OTAssertNil(object, ...) OTAssert(object == nil, ## __VA_ARGS__) #define OTAssertNotNil(object, ...) OTAssert(object != nil, ## __VA_ARGS__) @@ -49,14 +53,17 @@ } @catch (exception *e) { \ OTThrown = true; \ } \ OTAssert(OTThrown, ## __VA_ARGS__); \ } +#define OTSkip(...) \ + OTSkipImpl(self, _cmd, @__FILE__, __LINE__, ## __VA_ARGS__, nil) #ifdef __cplusplus extern "C" { #endif extern void OTAssertImpl(id testCase, SEL test, bool condition, OFString *check, OFString *file, size_t line, ...); +extern void OTSkipImpl(id testCase, SEL test, OFString *file, size_t line, ...); #ifdef __cplusplus } #endif