diff options
author | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-12 20:52:22 +0200 |
---|---|---|
committer | Markus Teich <markus.teich@stusta.mhn.de> | 2016-06-12 20:52:22 +0200 |
commit | 62b87e57a7f7042d27fe0a80b9194aeae0c14a50 (patch) | |
tree | 961a43363dbca413e4b1e65b367c0ffd553cfaf0 /test.h | |
parent | 5957a777076d014b17aada25afe0991397edbacc (diff) | |
download | libbrandt-62b87e57a7f7042d27fe0a80b9194aeae0c14a50.tar.gz libbrandt-62b87e57a7f7042d27fe0a80b9194aeae0c14a50.zip |
add tests for key generation
Diffstat (limited to 'test.h')
-rw-r--r-- | test.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _BRANDT_TEST_H | ||
2 | #define _BRANDT_TEST_H | ||
3 | |||
4 | #include <stdio.h> | ||
5 | |||
6 | int tests_run = 0; | ||
7 | int ret = 0; | ||
8 | |||
9 | #define check(cond, message) do { if (!(cond)) { fputs(message, stderr); return 0; } } while (0) | ||
10 | #define run(test) do { tests_run++; if (!test()) ret = 1; } while (0) | ||
11 | |||
12 | #endif | ||