Enable --gc:orc testing for nim-chronos (#161)
* enable --gc:orc testing on nim devel (1.5.x)
This commit is contained in:
parent
1243aef627
commit
1324b2f787
|
@ -13,12 +13,15 @@ requires "nim > 1.2.0",
|
|||
"httputils"
|
||||
|
||||
task test, "Run all tests":
|
||||
var commands = [
|
||||
var commands = @[
|
||||
"nim c -r -d:useSysAssert -d:useGcAssert tests/",
|
||||
"nim c -r -d:chronosStackTrace tests/",
|
||||
"nim c -r -d:release tests/",
|
||||
"nim c -r -d:release -d:chronosFutureTracking tests/"
|
||||
]
|
||||
when (NimMajor, NimMinor) >= (1, 5):
|
||||
commands.add "nim c -r --gc:orc -d:chronosFutureTracking -d:release -d:chronosStackTrace tests/"
|
||||
|
||||
for testname in ["testall"]:
|
||||
for cmd in commands:
|
||||
let curcmd = cmd & testname
|
||||
|
|
|
@ -516,10 +516,16 @@ type
|
|||
length, reserved: int
|
||||
|
||||
proc isLiteral*(s: string): bool {.inline.} =
|
||||
(cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0
|
||||
when defined(gcOrc) or defined(gcArc):
|
||||
false
|
||||
else:
|
||||
(cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0
|
||||
|
||||
proc isLiteral*[T](s: seq[T]): bool {.inline.} =
|
||||
(cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0
|
||||
when defined(gcOrc) or defined(gcArc):
|
||||
false
|
||||
else:
|
||||
(cast[ptr SeqHeader](s).reserved and (1 shl (sizeof(int) * 8 - 2))) != 0
|
||||
|
||||
when defined(windows):
|
||||
import winlean
|
||||
|
|
Loading…
Reference in New Issue