summaryrefslogtreecommitdiff
path: root/tests/pke-test-types.h
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-03-12 17:26:48 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-03-12 17:26:48 -0400
commit85a2ba407b1ae285b4080e14f8a18ecf4ec7da2c (patch)
tree0abe7044b6af5820e9f3c143733047b254e78e15 /tests/pke-test-types.h
parent68ef51ed3247dc4e7bd5970b9279a7d6a938ca52 (diff)
pke: more testing features + more ui flex work
Diffstat (limited to 'tests/pke-test-types.h')
-rw-r--r--tests/pke-test-types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pke-test-types.h b/tests/pke-test-types.h
index 5278eae..5a9ee24 100644
--- a/tests/pke-test-types.h
+++ b/tests/pke-test-types.h
@@ -15,6 +15,11 @@ typedef int (pke_test_func)();
struct pke_test_group;
typedef struct pke_test_group *(pke_test_get_group)();
+typedef void (pke_test_group_setup());
+typedef void (pke_test_group_teardown());
+typedef void (pke_test_setup());
+typedef void (pke_test_teardown());
+
struct pke_test {
const char *title;
pke_test_func *func;
@@ -23,8 +28,14 @@ struct pke_test {
struct pke_test_group {
const char *title;
+ pke_test_group_setup *group_setup;
+ pke_test_group_teardown *group_teardown;
+ pke_test_setup *test_setup;
+ pke_test_teardown *test_teardown;
struct pke_test *tests;
uint32_t n_tests;
};
+#define PKE_TEST_ASSERT(condition, index) if (!(condition)) { return ++index; } else { ++index; }
+
#endif /* PKE_PKE_TEST_TYPES_H */