ObjFW
|
Go to the source code of this file.
Macros | |
#define | OTAssert(condition, ...) |
Asserts that the specified condition condition holds. | |
#define | OTAssertTrue(condition, ...) OTAssert(condition == true, ## __VA_ARGS__) |
Asserts that the specified condition is true. | |
#define | OTAssertFalse(condition, ...) OTAssert(condition == false, ## __VA_ARGS__) |
Asserts that the specified condition is false. | |
#define | OTAssertEqual(a, b, ...) OTAssert(a == b, ## __VA_ARGS__) |
Asserts that the two values are equal. | |
#define | OTAssertNotEqual(a, b, ...) OTAssert(a != b, ## __VA_ARGS__) |
Asserts that the two values are not equal. | |
#define | OTAssertLessThan(a, b, ...) OTAssert(a < b, ## __VA_ARGS__) |
Asserts that the value is less than another value. | |
#define | OTAssertLessThanOrEqual(a, b, ...) OTAssert(a <= b, ## __VA_ARGS__) |
Asserts that the value is less than or equal to another value. | |
#define | OTAssertGreaterThan(a, b, ...) OTAssert(a > b, ## __VA_ARGS__) |
Asserts that the value is greater than another value. | |
#define | OTAssertGreaterThanOrEqual(a, b, ...) OTAssert(a >= b, ## __VA_ARGS__) |
Asserts that the value is greater than or equal to another value. | |
#define | OTAssertEqualObjects(a, b, ...) OTAssert([a isEqual: b], ## __VA_ARGS__) |
Asserts that the two objects are equal. | |
#define | OTAssertNotEqualObjects(a, b, ...) OTAssert(![a isEqual: b], ## __VA_ARGS__) |
Asserts that the two objects are not equal. | |
#define | OTAssertNil(object, ...) OTAssert(object == nil, ## __VA_ARGS__) |
Asserts that the specified object is nil . | |
#define | OTAssertNotNil(object, ...) OTAssert(object != nil, ## __VA_ARGS__) |
Asserts that the specified object is not nil . | |
#define | OTAssertThrows(expression, ...) |
Asserts that the specified expression throws an exception. | |
#define | OTAssertThrowsSpecific(expression, exception, ...) |
Asserts that the specified expression throws a specific exception. | |
#define | OTSkip(...) _OTSkipImpl(self, _cmd, @__FILE__, __LINE__, ## __VA_ARGS__, nil) |
Skips the current test, making it neither fail nor succeeed. | |
#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 succeeed.
... | An optional format string to print why the test was skipped, followed by optional arguments |