aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2019-05-07 22:22:25 -0500
committerGanesh Viswanathan <dev@genotrance.com>2019-05-07 22:22:25 -0500
commitf8c433832e2bc2832dec3fd8ebe8b01453104455 (patch)
tree6cb6ed3840502e2d6c56edf1f8832be937d830f1 /tests
parent2679833d22de0f3cee5fc2a0bef1e7065bc92ff5 (diff)
downloadnimterop-f8c433832e2bc2832dec3fd8ebe8b01453104455.tar.gz
nimterop-f8c433832e2bc2832dec3fd8ebe8b01453104455.zip
Add support for char enums - #119
Diffstat (limited to 'tests')
-rw-r--r--tests/include/test.h5
-rw-r--r--tests/tnimterop_c.nim2
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/include/test.h b/tests/include/test.h
index 2e4cf08..9a28dc0 100644
--- a/tests/include/test.h
+++ b/tests/include/test.h
@@ -73,6 +73,11 @@ enum ENUM5 {
enum15 = (1 << (1 & 1))
};
+enum ENUM7 {
+ enum17 = '\0',
+ enum18 = 'A'
+};
+
typedef void * VOIDPTR;
typedef int * INTPTR;
diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim
index 0eafa11..ddfa43e 100644
--- a/tests/tnimterop_c.nim
+++ b/tests/tnimterop_c.nim
@@ -127,6 +127,8 @@ check e4 == enum11
check enum13 == 4
check enum14 == 9
check enum15 == 2
+check enum17 == '\0'.ENUM7
+check enum18 == 'A'.ENUM7
# Issue #58
multiline1()