|
ObjFW
|
Go to the source code of this file.
Macros | |
| #define | OTAssert(condition, ...) |
| Asserts that the specified condition condition holds. More... | |
| #define | OTAssertTrue(condition, ...) OTAssert((condition) == true, ## __VA_ARGS__) |
| Asserts that the specified condition is true. More... | |
| #define | OTAssertFalse(condition, ...) OTAssert((condition) == false, ## __VA_ARGS__) |
| Asserts that the specified condition is false. More... | |
| #define | OTAssertEqual(a, b, ...) OTAssert(a == b, ## __VA_ARGS__) |
| Asserts that the two values are equal. More... | |
| #define | OTAssertNotEqual(a, b, ...) OTAssert(a != b, ## __VA_ARGS__) |
| Asserts that the two values are not equal. More... | |
| #define | OTAssertLessThan(a, b, ...) OTAssert(a < b, ## __VA_ARGS__) |
| Asserts that the value is less than another value. More... | |
| #define | OTAssertLessThanOrEqual(a, b, ...) OTAssert(a <= b, ## __VA_ARGS__) |
| Asserts that the value is less than or equal to another value. More... | |
| #define | OTAssertGreaterThan(a, b, ...) OTAssert(a > b, ## __VA_ARGS__) |
| Asserts that the value is greater than another value. More... | |
| #define | OTAssertGreaterThanOrEqual(a, b, ...) OTAssert(a >= b, ## __VA_ARGS__) |
| Asserts that the value is greater than or equal to another value. More... | |
| #define | OTAssertEqualObjects(a, b, ...) OTAssert([a isEqual: b], ## __VA_ARGS__) |
| Asserts that the two objects are equal. More... | |
| #define | OTAssertNotEqualObjects(a, b, ...) OTAssert(![a isEqual: b], ## __VA_ARGS__) |
| Asserts that the two objects are not equal. More... | |
| #define | OTAssertNil(object, ...) OTAssert(object == nil, ## __VA_ARGS__) |
Asserts that the specified object is nil. More... | |
| #define | OTAssertNotNil(object, ...) OTAssert(object != nil, ## __VA_ARGS__) |
Asserts that the specified object is not nil. More... | |
| #define | OTAssertThrows(expression, ...) |
| Asserts that the specified expression throws an exception. More... | |
| #define | OTAssertThrowsSpecific(expression, exception, ...) |
| Asserts that the specified expression throws a specific exception. More... | |
| #define | OTSkip(...) _OTSkipImpl(self, _cmd, @__FILE__, __LINE__, ## __VA_ARGS__, nil) |
| Skips the current test, making it neither fail nor succeed. More... | |
| #define OTAssert | ( | condition, | |
| ... | |||
| ) |
Asserts that the specified condition condition holds.
| condition | The condition to check |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertEqual | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a == b, ## __VA_ARGS__) |
Asserts that the two values are equal.
| a | The value to check |
| b | The expected value |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertEqualObjects | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert([a isEqual: b], ## __VA_ARGS__) |
Asserts that the two objects are equal.
| a | The object to check |
| b | The object a is expected to be equal to |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertFalse | ( | condition, | |
| ... | |||
| ) | OTAssert((condition) == false, ## __VA_ARGS__) |
Asserts that the specified condition is false.
| condition | The condition to check |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertGreaterThan | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a > b, ## __VA_ARGS__) |
Asserts that the value is greater than another value.
| a | The value to check |
| b | The value a should be greater than |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertGreaterThanOrEqual | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a >= b, ## __VA_ARGS__) |
Asserts that the value is greater than or equal to another value.
| a | The value to check |
| b | The value a should be greater than or equal to |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertLessThan | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a < b, ## __VA_ARGS__) |
Asserts that the value is less than another value.
| a | The value to check |
| b | The value a should be less than |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertLessThanOrEqual | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a <= b, ## __VA_ARGS__) |
Asserts that the value is less than or equal to another value.
| a | The value to check |
| b | The value a should be less than or equal to |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
Asserts that the specified object is nil.
| object | The object to should be nil |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertNotEqual | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(a != b, ## __VA_ARGS__) |
Asserts that the two values are not equal.
| a | The value to check |
| b | The value a should not have |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertNotEqualObjects | ( | a, | |
| b, | |||
| ... | |||
| ) | OTAssert(![a isEqual: b], ## __VA_ARGS__) |
Asserts that the two objects are not equal.
| a | The object to check |
| b | The object a is expected to be not equal to |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
Asserts that the specified object is not nil.
| object | The object to should not be nil |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertThrows | ( | expression, | |
| ... | |||
| ) |
Asserts that the specified expression throws an exception.
| expression | The expression that should throw |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertThrowsSpecific | ( | expression, | |
| exception, | |||
| ... | |||
| ) |
Asserts that the specified expression throws a specific exception.
| expression | The expression that should throw |
| exception | The exception the expression should throw (as just the class name, without quotes) |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTAssertTrue | ( | condition, | |
| ... | |||
| ) | OTAssert((condition) == true, ## __VA_ARGS__) |
Asserts that the specified condition is true.
| condition | The condition to check |
| ... | An optional format string to print if the assertion failed, followed by optional arguments |
| #define OTSkip | ( | ... | ) | _OTSkipImpl(self, _cmd, @__FILE__, __LINE__, ## __VA_ARGS__, nil) |
Skips the current test, making it neither fail nor succeed.
| ... | An optional format string to print why the test was skipped, followed by optional arguments |
1.8.14