diff options
| author | genotrance <dev@genotrance.com> | 2019-05-08 21:05:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-08 21:05:00 -0500 |
| commit | def527ae6052a707bb61c0cd5e3cdc8be55130a5 (patch) | |
| tree | bbc616b5509e2dc14d40330bcc8d2c16d55877d8 /tests | |
| parent | 69cfce561a2114616e57c64effc2f6d36db1967d (diff) | |
| parent | d9ab18c7757193f14fac69f3b462981b79defc93 (diff) | |
| download | nimterop-def527ae6052a707bb61c0cd5e3cdc8be55130a5.tar.gz nimterop-def527ae6052a707bb61c0cd5e3cdc8be55130a5.zip | |
Multiple enhancements (#128)
Multiple enhancements
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/test.h | 6 | ||||
| -rw-r--r-- | tests/tmath.nim | 5 | ||||
| -rw-r--r-- | tests/tnimterop_c.nim | 4 |
3 files changed, 15 insertions, 0 deletions
diff --git a/tests/include/test.h b/tests/include/test.h index 8138e54..9a28dc0 100644 --- a/tests/include/test.h +++ b/tests/include/test.h @@ -27,6 +27,7 @@ extern "C" { typedef uint8_t PRIMTYPE; typedef PRIMTYPE CUSTTYPE; +typedef CUSTTYPE _CCUSTTYPE_; struct STRUCT0; @@ -72,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/tmath.nim b/tests/tmath.nim index 95fc086..b2f803b 100644 --- a/tests/tmath.nim +++ b/tests/tmath.nim @@ -6,6 +6,11 @@ type mingw_ldbl_type_t = object mingw_dbl_type_t = object +when defined(windows): + cOverride: + type + complex = object + static: cDebug() cDisableCaching() diff --git a/tests/tnimterop_c.nim b/tests/tnimterop_c.nim index 01fa70b..ddfa43e 100644 --- a/tests/tnimterop_c.nim +++ b/tests/tnimterop_c.nim @@ -40,6 +40,7 @@ block: var pt: PRIMTYPE ct: CUSTTYPE + cct: CCUSTTYPE s0: STRUCT0 s1: STRUCT1 @@ -64,6 +65,7 @@ var pt = 3 ct = 4 +cct = 5 s1.field1 = 5 s2.field1 = 6 @@ -125,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() |
