aboutsummaryrefslogtreecommitdiff
path: root/test.h
diff options
context:
space:
mode:
authorMarkus Teich <markus.teich@stusta.mhn.de>2016-06-12 20:52:22 +0200
committerMarkus Teich <markus.teich@stusta.mhn.de>2016-06-12 20:52:22 +0200
commit62b87e57a7f7042d27fe0a80b9194aeae0c14a50 (patch)
tree961a43363dbca413e4b1e65b367c0ffd553cfaf0 /test.h
parent5957a777076d014b17aada25afe0991397edbacc (diff)
downloadlibbrandt-62b87e57a7f7042d27fe0a80b9194aeae0c14a50.tar.gz
libbrandt-62b87e57a7f7042d27fe0a80b9194aeae0c14a50.zip
add tests for key generation
Diffstat (limited to 'test.h')
-rw-r--r--test.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/test.h b/test.h
new file mode 100644
index 0000000..db63350
--- /dev/null
+++ b/test.h
@@ -0,0 +1,12 @@
1#ifndef _BRANDT_TEST_H
2#define _BRANDT_TEST_H
3
4#include <stdio.h>
5
6int tests_run = 0;
7int 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