diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2020-05-06 14:18:15 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2020-05-06 14:18:15 -0500 |
| commit | 1a1ae30456aa05083cdffdf22b56473390ad5f10 (patch) | |
| tree | 4a86fc1ca6abf0fd496970d52679e663689c001a /tests | |
| parent | fabb46a639ad38c349e22f5fc0ab37b187772ec3 (diff) | |
| parent | c7060f4c5598228585f35057b57bc7435c7f09ce (diff) | |
| download | nimterop-1a1ae30456aa05083cdffdf22b56473390ad5f10.tar.gz nimterop-1a1ae30456aa05083cdffdf22b56473390ad5f10.zip | |
Merge branch 'master' of https://github.com/nimterop/nimterop
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/include/tast2.h | 2 | ||||
| -rw-r--r-- | tests/tast2.nim | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/include/tast2.h b/tests/include/tast2.h index 2ddb58e..0b1fca2 100644 --- a/tests/include/tast2.h +++ b/tests/include/tast2.h @@ -20,6 +20,8 @@ extern "C" { #define COERCE 645635634896ull + 35436 #define COERCE2 645635634896 + 35436ul #define BINEXPR ~(-(1u << !-1)) ^ (10 >> 1) +#define POINTEREXPR (int*)0 +#define POINTERPOINTERPOINTEREXPR (int***)0 #define BOOL true #define MATHEXPR (1 + 2/3*20 - 100) #define ANDEXPR (100 & 11000) diff --git a/tests/tast2.nim b/tests/tast2.nim index 54b89e5..6cdd606 100644 --- a/tests/tast2.nim +++ b/tests/tast2.nim @@ -150,6 +150,9 @@ assert SHL1 == (1.uint shl 1) assert SHL2 == (1.uint shl 2) assert SHL3 == (1.uint shl 3) +assert typeof(POINTEREXPR) is (ptr cint) +assert typeof(POINTERPOINTERPOINTEREXPR) is (ptr ptr ptr cint) + assert ALLSHL == (SHL1 or SHL2 or SHL3) assert A0 is object |
