aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoey Yakimowich-Payne <jyapayne@gmail.com>2020-05-05 20:36:02 -0600
committergenotrance <dev@genotrance.com>2020-05-06 11:08:07 -0500
commitd5c15d0d3aebc1eced79faa0c1621351be56f60a (patch)
tree4251e315edd6c46c138404ad5f46eca4b70f6eff /tests
parent87eef11ec17713c0eb6f5f17c419216efde79fa8 (diff)
downloadnimterop-d5c15d0d3aebc1eced79faa0c1621351be56f60a.tar.gz
nimterop-d5c15d0d3aebc1eced79faa0c1621351be56f60a.zip
Add multiple pointer support
Diffstat (limited to 'tests')
-rw-r--r--tests/include/tast2.h1
-rw-r--r--tests/tast2.nim1
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/include/tast2.h b/tests/include/tast2.h
index c7b85c7..0b1fca2 100644
--- a/tests/include/tast2.h
+++ b/tests/include/tast2.h
@@ -21,6 +21,7 @@ extern "C" {
#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 4254a9d..6cdd606 100644
--- a/tests/tast2.nim
+++ b/tests/tast2.nim
@@ -151,6 +151,7 @@ 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)