diff options
-rw-r--r-- | lib/system.nim | 6 | ||||
-rw-r--r-- | tests/testament/categories.nim | 7 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/system.nim b/lib/system.nim index 4c8af3d51..fae111ce2 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2581,10 +2581,11 @@ else: when not defined(JS): #and not defined(nimscript): {.push stack_trace: off, profiler:off.} - when not defined(nimscript) and not defined(nogc): + when hasAlloc: when not defined(gcStack): proc initGC() - when not defined(boehmgc) and not defined(useMalloc) and not defined(gogc) and not defined(gcStack): + when not defined(boehmgc) and not defined(useMalloc) and + not defined(gogc) and not defined(gcStack): proc initAllocator() {.inline.} proc initStackBottom() {.inline, compilerproc.} = @@ -2602,7 +2603,6 @@ when not defined(JS): #and not defined(nimscript): when declared(setStackBottom): setStackBottom(locals) - when hasAlloc: var strDesc = TNimType(size: sizeof(string), kind: tyString, flags: {ntfAcyclic}) diff --git a/tests/testament/categories.nim b/tests/testament/categories.nim index 3ed2f2196..2b0b55c0b 100644 --- a/tests/testament/categories.nim +++ b/tests/testament/categories.nim @@ -115,6 +115,12 @@ proc dllTests(r: var TResults, cat: Category, options: string) = # ------------------------------ GC tests ------------------------------------- proc gcTests(r: var TResults, cat: Category, options: string) = + template testWithNone(filename: untyped) = + testSpec r, makeTest("tests/gc" / filename, options & + " --gc:none", cat, actionRun) + testSpec r, makeTest("tests/gc" / filename, options & + " -d:release --gc:none", cat, actionRun) + template testWithoutMs(filename: untyped) = testSpec r, makeTest("tests/gc" / filename, options, cat, actionRun) testSpec r, makeTest("tests/gc" / filename, options & @@ -144,6 +150,7 @@ proc gcTests(r: var TResults, cat: Category, options: string) = test "gcleak" test "gcleak2" test "gctest" + testWithNone "gctest" test "gcleak3" test "gcleak4" # Disabled because it works and takes too long to run: |