aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoey Yakimowich-Payne <jyapayne@gmail.com>2020-04-23 16:53:52 -0600
committerJoey Yakimowich-Payne <jyapayne@gmail.com>2020-04-26 09:11:56 -0600
commit9e799ee3b19ac152d1c2403c6af1e3806e1a31fe (patch)
tree95494a86039e99eb545431e8d946dadd43be03d8 /tests
parent2813dc61f22aecaaaa82054f144a48c4de520cf2 (diff)
downloadnimterop-9e799ee3b19ac152d1c2403c6af1e3806e1a31fe.tar.gz
nimterop-9e799ee3b19ac152d1c2403c6af1e3806e1a31fe.zip
Fix tmath tests
Modify tmath.nim to have one skip symbol Fix macro expansion with common value Fix tmath again
Diffstat (limited to 'tests')
-rw-r--r--tests/include/tast2.h16
-rw-r--r--tests/tast2.nim18
-rw-r--r--tests/tmath.nim6
3 files changed, 21 insertions, 19 deletions
diff --git a/tests/include/tast2.h b/tests/include/tast2.h
index e72a3b8..815791f 100644
--- a/tests/include/tast2.h
+++ b/tests/include/tast2.h
@@ -24,14 +24,14 @@ extern "C" {
#define MATHEXPR (1 + 2/3*20 - 100)
#define ANDEXPR (100 & 11000)
#define CASTEXPR (char) 34
-#define a 100
-#define b 200
-#define EQ1 a <= b
-#define EQ2 a >= b
-#define EQ3 a > b
-#define EQ4 a < b
-#define EQ5 a != b
-#define EQ6 a == b
+#define AVAL 100
+#define BVAL 200
+#define EQ1 AVAL <= BVAL
+#define EQ2 AVAL >= BVAL
+#define EQ3 AVAL > BVAL
+#define EQ4 AVAL < BVAL
+#define EQ5 AVAL != BVAL
+#define EQ6 AVAL == BVAL
#define SIZEOF sizeof(char)
diff --git a/tests/tast2.nim b/tests/tast2.nim
index 57bfc90..da7fafa 100644
--- a/tests/tast2.nim
+++ b/tests/tast2.nim
@@ -115,15 +115,15 @@ assert ULLEXPR == (1234.uint64 shl 3)
assert LEXPR == (1234.int32 shl 4)
assert LLEXPR == (1234.int64 shl 5)
-assert a == 100
-assert b == 200
-
-assert EQ1 == (a <= b)
-assert EQ2 == (a >= b)
-assert EQ3 == (a > b)
-assert EQ4 == (a < b)
-assert EQ5 == (a != b)
-assert EQ6 == (a == b)
+assert AVAL == 100
+assert BVAL == 200
+
+assert EQ1 == (AVAL <= BVAL)
+assert EQ2 == (AVAL >= BVAL)
+assert EQ3 == (AVAL > BVAL)
+assert EQ4 == (AVAL < BVAL)
+assert EQ5 == (AVAL != BVAL)
+assert EQ6 == (AVAL == BVAL)
assert SIZEOF == 1
diff --git a/tests/tmath.nim b/tests/tmath.nim
index bbf7abd..b8477c1 100644
--- a/tests/tmath.nim
+++ b/tests/tmath.nim
@@ -14,9 +14,11 @@ when defined(windows):
static:
when (NimMajor, NimMinor, NimPatch) < (1, 0, 0):
- cSkipSymbol @["mingw_choose_expr", "EXCEPTION_DEFINED", "COMPLEX_DEFINED", "matherr", "HUGE", "FP_ILOGB0", "FP_ILOGBNAN"]
+ # FP_ILOGB0 and FP_ILOGBNAN are casts that are unsupported
+ # on lower Nim VMs
+ cSkipSymbol @["math_errhandling", "FP_ILOGB0", "FP_ILOGBNAN"]
else:
- cSkipSymbol @["mingw_choose_expr", "EXCEPTION_DEFINED", "COMPLEX_DEFINED", "matherr", "HUGE"]
+ cSkipSymbol @["math_errhandling"]
cDebug()
cDisableCaching()
cAddStdDir()