diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-17 17:25:18 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-17 17:25:18 -0800 |
| commit | 293a8e2c4f7a13fe81c043a91a9e7e3fd5ba4093 (patch) | |
| tree | 5cd1889cfd986fe040cf70c3c4799aff8b80a7b4 /tests/demo.c | |
| parent | 2fea9b850333d8f48e83fbbd87921f47c1fa8bb5 (diff) | |
| download | nng-293a8e2c4f7a13fe81c043a91a9e7e3fd5ba4093.tar.gz nng-293a8e2c4f7a13fe81c043a91a9e7e3fd5ba4093.tar.bz2 nng-293a8e2c4f7a13fe81c043a91a9e7e3fd5ba4093.zip | |
Nicer test framework -- more internals in the .C, nicer and more correct
test result output.
Diffstat (limited to 'tests/demo.c')
| -rw-r--r-- | tests/demo.c | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/tests/demo.c b/tests/demo.c index 2b874b9e..cfa879da 100644 --- a/tests/demo.c +++ b/tests/demo.c @@ -15,19 +15,35 @@ test_main("Things work", { test_so(y == 3); }); -test_convey("Bounce", { - test_convey("Arithmetic", { - test_so(y == 2); - test_convey("Addition", { - test_so(x + y == 3); - test_so(x + y + y == 5); - y = 5; - test_so(x + y == 6); + 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(); + test_so(0 == 1); }); - test_convey("Subtraction", { - test_so(x - y == -1); - test_so(y - x == 1); + test_convey("Ending", { + test_so(2 == 2); }); }); -}); + }) |
