ObjFW  Diff

Differences From Artifact [8bd6d8696c]:

To Artifact [41f0812f71]:


29
30
31
32
33
34
35
36

37
38
39
40
41
42
43
29
30
31
32
33
34
35

36
37
38
39
40
41
42
43







-
+







 * @brief Asserts that the specified condition condition holds.
 *
 * @param condition The condition to check
 * @param ... An optional format string to print if the assertion failed,
 *	      followed by optional arguments
 */
#define OTAssert(condition, ...) \
	OTAssertImpl(self, _cmd, condition, @#condition, \
	_OTAssertImpl(self, _cmd, condition, @#condition, \
	    @__FILE__, __LINE__, ## __VA_ARGS__, nil)

/**
 * @brief Asserts that the specified condition is true.
 *
 * @param condition The condition to check
 * @param ... An optional format string to print if the assertion failed,
196
197
198
199
200
201
202
203

204
205
206
207
208
209
210




211
212
213
196
197
198
199
200
201
202

203
204
205
206
207



208
209
210
211
212
213
214







-
+




-
-
-
+
+
+
+



/**
 * @brief Skips the current test, making it neither fail nor succeeed.
 *
 * @param ... An optional format string to print why the test was skipped,
 *	      followed by optional arguments
 */
#define OTSkip(...) \
	OTSkipImpl(self, _cmd, @__FILE__, __LINE__, ## __VA_ARGS__, nil)
	_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, ...);
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