blob: c38dd3b90ec7d5ac8788fe009922714c6e1441a3 (
plain)
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
|
#include <stdio.h>
#include "test.h"
test_main("Things work", {
int x;
int y;
x = 1;
y = 2;
test_convey("X is one", {
test_debugf("A logged message.");
test_assert(x == 1);
});
test_convey("Y is two", {
test_so(y == 2);
y = 3;
test_so(y == 3);
});
test_convey("Operations (Outer)", {
test_convey("Arithmetic", {
test_so(y == 2);
test_convey("Addition", {
test_so(x + y == 3);
test_so(x + y + y == 5);
test_so(x == 9);
y = 5;
test_so(x + y == 6);
});
test_convey("Subtraction", {
test_so(x - y == -1);
test_so(y - x == 1);
});
});
});
test_convey("Middle test is skipped", {
test_convey("Start", {
test_so(1 == 1);
});
test_convey("Middle (Skip?)", {
test_so(9 - 1 == 8);
test_skip("forced skip");
test_so(0 == 1);
});
test_convey("Ending", {
test_so(2 == 2);
});
});
})
|