diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-31 13:36:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-31 06:36:50 +0100 |
commit | e1ddd2d524e3e57df25d6498d275f019e450111e (patch) | |
tree | 9d531ffc00e74da2569977b792a8b3304f25c919 /tests/stdlib | |
parent | fb2ec8d192cbaa36868f28275993936868ba2d31 (diff) | |
download | Nim-e1ddd2d524e3e57df25d6498d275f019e450111e.tar.gz |
put std/threads under the umbrella of nimPreviewSlimSystem (#20711)
* put `std/threads` under the umbrella of `nimPreviewSlimSystem` * add changelog * fixes tests * fixes tests again * fixes tests
Diffstat (limited to 'tests/stdlib')
-rw-r--r-- | tests/stdlib/tenvvars.nim | 5 | ||||
-rw-r--r-- | tests/stdlib/tnetdial.nim | 2 | ||||
-rw-r--r-- | tests/stdlib/tosenv.nim | 6 | ||||
-rw-r--r-- | tests/stdlib/tssl.nim | 2 |
4 files changed, 11 insertions, 4 deletions
diff --git a/tests/stdlib/tenvvars.nim b/tests/stdlib/tenvvars.nim index f09dd0965..e49bd519a 100644 --- a/tests/stdlib/tenvvars.nim +++ b/tests/stdlib/tenvvars.nim @@ -7,7 +7,10 @@ discard """ import std/envvars from std/sequtils import toSeq import stdtest/testutils -import std/assertions +import std/[assertions] + +when not defined(js): + import std/threads # "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386) const unicodeUtf8 = "\xc3\x86" diff --git a/tests/stdlib/tnetdial.nim b/tests/stdlib/tnetdial.nim index 3b8276d6f..41485d525 100644 --- a/tests/stdlib/tnetdial.nim +++ b/tests/stdlib/tnetdial.nim @@ -5,7 +5,7 @@ discard """ """ import os, net, nativesockets, asyncdispatch -import std/[assertions] +import std/[assertions, threads] ## Test for net.dial diff --git a/tests/stdlib/tosenv.nim b/tests/stdlib/tosenv.nim index 365edc8c2..f715b4b70 100644 --- a/tests/stdlib/tosenv.nim +++ b/tests/stdlib/tosenv.nim @@ -7,7 +7,9 @@ discard """ import std/os from std/sequtils import toSeq import stdtest/testutils -import std/assertions + +when defined(nimPreviewSlimSystem): + import std/[assertions] # "LATIN CAPITAL LETTER AE" in UTF-8 (0xc386) const unicodeUtf8 = "\xc3\x86" @@ -55,6 +57,8 @@ when defined(windows): proc c_getenv(env: cstring): cstring {.importc: "getenv", header: "<stdlib.h>".} when not defined(js) and not defined(nimscript): + when defined(nimPreviewSlimSystem): + import std/threads block: # bug #18533 var thr: Thread[void] proc threadFunc {.thread.} = putEnv("foo", "fooVal2") diff --git a/tests/stdlib/tssl.nim b/tests/stdlib/tssl.nim index 6d238e6c9..e4c6f68cf 100644 --- a/tests/stdlib/tssl.nim +++ b/tests/stdlib/tssl.nim @@ -4,7 +4,7 @@ discard """ disabled: "openbsd" """ # disabled: pending bug #15713 -import std/[net, nativesockets, assertions] +import std/[net, nativesockets, assertions, threads] when defined(posix): import os, posix else: |