Enable --gc:orc testing for nim-chronos (#161)

* enable --gc:orc testing on nim devel (1.5.x)
This commit is contained in:
Andreas Rumpf 2021-03-03 19:04:09 +01:00 committed by GitHub
parent 1243aef627
commit 1324b2f787
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -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

View File

@ -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