50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
else { \
[self outputFailure: test \
inModule: module]; \
_fails++; \
} \
}
#define R(...) (__VA_ARGS__, 1)
#define PRINT(color, fmt, ...) \
{ \
OFString *msg = [OFString stringWithFormat: \
@"[%@] " fmt @"\n", module, __VA_ARGS__]; \
[self outputString: msg \
inColor: color]; \
}
@class OFString;
enum {
NO_COLOR,
RED,
GREEN,
YELLOW
};
@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
{
int _fails;
}
- (void)outputString: (OFString *)str
inColor: (int)color;
- (void)outputTesting: (OFString *)test
inModule: (OFString *)module;
- (void)outputSuccess: (OFString *)test
inModule: (OFString *)module;
- (void)outputFailure: (OFString *)test
inModule: (OFString *)module;
@end
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
else { \
[self outputFailure: test \
inModule: module]; \
_fails++; \
} \
}
#define R(...) (__VA_ARGS__, 1)
@class OFString;
@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
{
int _fails;
}
- (void)outputTesting: (OFString *)test
inModule: (OFString *)module;
- (void)outputSuccess: (OFString *)test
inModule: (OFString *)module;
- (void)outputFailure: (OFString *)test
inModule: (OFString *)module;
@end
|