aboutsummaryrefslogtreecommitdiffstats
path: root/tests/enum-validator-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/enum-validator-test.c')
-rw-r--r--tests/enum-validator-test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/enum-validator-test.c b/tests/enum-validator-test.c
new file mode 100644
index 0000000..92037cf
--- /dev/null
+++ b/tests/enum-validator-test.c
@@ -0,0 +1,13 @@
+#include <assert.h>
+#include "data/small-server-core.h"
+
+int
+main(int argc, char *argv[]) {
+ assert(intf_A_foo_is_valid(INTF_A_FOO_FIRST, 1));
+ assert(intf_A_foo_is_valid(INTF_A_FOO_FIRST, 2));
+
+ assert(!intf_A_foo_is_valid(INTF_A_FOO_THIRD, 1));
+ assert(intf_A_foo_is_valid(INTF_A_FOO_THIRD, 2));
+
+ assert(intf_A_foo_is_valid(INTF_A_FOO_NEGATIVE, 2));
+}