-
Notifications
You must be signed in to change notification settings - Fork 15
/
test.c
58 lines (47 loc) · 889 Bytes
/
test.c
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include "clar.h"
void test_test__passes_one(void)
{
cl_assert_equal_i(42, (21 + 21));
}
void test_test__passes_two(void)
{
cl_assert_equal_i(99, (33 * 3));
}
void test_test__passes_three(void)
{
cl_assert_equal_s("hello", "he" "llo");
}
void test_test__passes_four(void)
{
cl_assert_equal_s("world", "world" "");
}
void test_test__fails_five(void)
{
cl_assert_equal_i(42, (42 + 1));
}
void test_test__fails_six(void)
{
cl_assert_equal_i(99, (99 - 1));
}
void test_test__fails_seven(void)
{
cl_assert_equal_s("hello", "world" "");
}
void test_test__fails_eight(void)
{
cl_assert_equal_s("world", "he" "llo");
}
void test_test__skips_nine(void)
{
cl_skip();
cl_assert_equal_i(42, 99);
}
void test_test__skips_ten(void)
{
cl_skip();
cl_assert_equal_i(72, 72);
}
int main(int argc, char **argv)
{
return clar_test(argc, argv);
}