-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.c
More file actions
40 lines (34 loc) · 681 Bytes
/
Copy pathtest.c
File metadata and controls
40 lines (34 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <assert.h>
#include "ok.h"
int main (void) {
okx("foo", 123, 0);
ok_expect(4);
ok_explain(
"this is a libok test\n"
"this is the explaination of that test\n"
"it is in multiline comment block"
);
assert(4 == ok_expected());
ok("beep");
assert(1 == ok_count());
ok("boop");
assert(2 == ok_count());
ok("biz");
assert(3 == ok_count());
ok("baz");
assert(4 == ok_count());
if (ok_done() != true) {
return 1;
}
ok_reset();
ok_explain(
"this next test should fail\n"
"the `ok_done()` function should return `false`"
);
ok("first");
notok("oops");
if (ok_done() != false) {
return 1;
}
return 0;
}