summaryrefslogtreecommitdiff
path: root/tests/pke-test-types.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pke-test-types.h')
-rw-r--r--tests/pke-test-types.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/pke-test-types.h b/tests/pke-test-types.h
new file mode 100644
index 0000000..5278eae
--- /dev/null
+++ b/tests/pke-test-types.h
@@ -0,0 +1,30 @@
+#ifndef PKE_PKE_TEST_TYPES_H
+#define PKE_PKE_TEST_TYPES_H
+
+#include <setjmp.h>
+#include <stdint.h>
+
+struct pke_test_long_jump {
+ uint8_t expected_exit;
+ uint8_t caught;
+ jmp_buf jump_env;
+};
+extern struct pke_test_long_jump lj;
+
+typedef int (pke_test_func)();
+struct pke_test_group;
+typedef struct pke_test_group *(pke_test_get_group)();
+
+struct pke_test {
+ const char *title;
+ pke_test_func *func;
+ int expected_result;
+};
+
+struct pke_test_group {
+ const char *title;
+ struct pke_test *tests;
+ uint32_t n_tests;
+};
+
+#endif /* PKE_PKE_TEST_TYPES_H */