diff options
| author | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2020-04-20 11:33:53 -0600 |
|---|---|---|
| committer | Joey Yakimowich-Payne <jyapayne@gmail.com> | 2020-04-26 09:11:48 -0600 |
| commit | 208098b3eb959e477a3625a8a48305ddaa1cec4f (patch) | |
| tree | 431b339a8bc36ab2eb518070c4e177ebe9f8bbd4 /tests | |
| parent | aa1086fae37999180b485ced323d35acec7868a1 (diff) | |
| download | nimterop-208098b3eb959e477a3625a8a48305ddaa1cec4f.tar.gz nimterop-208098b3eb959e477a3625a8a48305ddaa1cec4f.zip | |
Make bitwise_expression forwards compatible
Skip syms for tmath
Skip more syms
Add casting back for cast_expression. Disable cast test on Nim < 1.0.0
Skip more syms for cast expressions on Nim < 1.0.0
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/tast2.nim | 11 | ||||
| -rw-r--r-- | tests/tmath.nim | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/tests/tast2.nim b/tests/tast2.nim index d43ce9f..0b3762a 100644 --- a/tests/tast2.nim +++ b/tests/tast2.nim @@ -3,11 +3,16 @@ import macros, os, sets, strutils import nimterop/[cimport] static: + # Skip casting on lower nim compilers because + # the VM does not support it + when (NimMajor, NimMinor, NimPatch) < (1, 0, 0): + cSkipSymbol @["CASTEXPR"] cDebug() const path = currentSourcePath.parentDir() / "include" / "tast2.h" + when defined(HEADER): cDefine("HEADER") const @@ -118,7 +123,9 @@ assert BINEXPR == 5 assert BOOL == true assert MATHEXPR == -99 assert ANDEXPR == 96 -assert CASTEXPR == 34.chr + +when (NimMajor, NimMinor, NimPatch) >= (1, 0, 0): + assert CASTEXPR == 34.chr assert TRICKYSTR == "N\x1C\nfoo\x00\'\"\c\v\a\b\e\f\t\\\\?bar" assert NULLCHAR == '\0' @@ -453,4 +460,4 @@ checkPragmas(nested, pHeaderImpBy) when defined(HEADER): assert sitest1(5) == 10 - assert sitest1(10) == 20
\ No newline at end of file + assert sitest1(10) == 20 diff --git a/tests/tmath.nim b/tests/tmath.nim index 5d84700..bbf7abd 100644 --- a/tests/tmath.nim +++ b/tests/tmath.nim @@ -13,6 +13,10 @@ when defined(windows): complex = object static: + when (NimMajor, NimMinor, NimPatch) < (1, 0, 0): + cSkipSymbol @["mingw_choose_expr", "EXCEPTION_DEFINED", "COMPLEX_DEFINED", "matherr", "HUGE", "FP_ILOGB0", "FP_ILOGBNAN"] + else: + cSkipSymbol @["mingw_choose_expr", "EXCEPTION_DEFINED", "COMPLEX_DEFINED", "matherr", "HUGE"] cDebug() cDisableCaching() cAddStdDir() |
