diff options
| author | Garrett D'Amore <garrett@damore.org> | 2016-12-18 18:07:12 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2016-12-18 18:07:12 -0800 |
| commit | 5293a691d6036d9bccdfceab250443ca3dc92051 (patch) | |
| tree | 235809edc6988419f1a8f96a5fd1fca61eaff6d3 /tests/demo.c | |
| parent | da927294ee63ff0995592863ea6d3d70a239c61d (diff) | |
| download | nng-5293a691d6036d9bccdfceab250443ca3dc92051.tar.gz nng-5293a691d6036d9bccdfceab250443ca3dc92051.tar.bz2 nng-5293a691d6036d9bccdfceab250443ca3dc92051.zip | |
Add test groups, free memory used by tests.
Diffstat (limited to 'tests/demo.c')
| -rw-r--r-- | tests/demo.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/demo.c b/tests/demo.c index c38dd3b9..26210391 100644 --- a/tests/demo.c +++ b/tests/demo.c @@ -1,7 +1,10 @@ #include <stdio.h> +#include <unistd.h> +#include <stdlib.h> #include "test.h" -test_main("Things work", { +test_main_group({ + test_group("Things work", { int x; int y; x = 1; @@ -47,4 +50,13 @@ test_main("Things work", { }); }); + }); + + test_group("Second group", { + int x = 1; + test_convey("x is 1", { + sleep(2); + test_so(x == 1); + }); + }); }) |
