diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-19 00:23:26 -0600 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2019-01-19 00:23:26 -0600 |
| commit | 47bc610c9ac321c69b4919b9c339e9e390a806a7 (patch) | |
| tree | adede4092edcaffdfa67bb1cec4a8f3ecf1a5eed /tests | |
| parent | dd234ab7eff217d9d14df7d0fe16ff44466f5be9 (diff) | |
| download | nimterop-47bc610c9ac321c69b4919b9c339e9e390a806a7.tar.gz nimterop-47bc610c9ac321c69b4919b9c339e9e390a806a7.zip | |
Fix #41
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/test.h | 2 | ||||
| -rw-r--r-- | tests/tnimterop_c.nim | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/tests/include/test.h b/tests/include/test.h index 64bdbb2..f450814 100644 --- a/tests/include/test.h +++ b/tests/include/test.h @@ -77,7 +77,7 @@ typedef struct { ENUM4 *field5[TEST_INT]; } STRUCT4; -typedef struct STRUCT5 { +typedef struct struct5 { int (*tci)(); struct STRUCT1 (*tcp)(int); float (*tcp8)(int *i); diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim index 86526c1..e848950 100644 --- a/tests/tnimterop_c.nim +++ b/tests/tnimterop_c.nim @@ -33,6 +33,7 @@ var s3: STRUCT3 s4: STRUCT4 s5: STRUCT5 + s51: struct5 e: ENUM e2: ENUM2 = enum5 @@ -62,7 +63,9 @@ else: # TODO: what's `defined(cpp)` for c ? s5.tci = test_call_int s5.tcp = test_call_param s5.tcp8 = test_call_param8 +s51.tci = test_call_int check s5.tci() == 5 +check s51.tci() == 5 e = enum1 e2 = enum4 |
