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
This commit is contained in:
parent
aa1086fae3
commit
208098b3eb
3 changed files with 18 additions and 5 deletions
|
|
@ -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
|
||||
assert sitest1(10) == 20
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue