summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/closure/tclosure4.nim8
-rw-r--r--tests/parallel/tarray_of_channels.nim2
-rw-r--r--tests/parallel/tgc_unsafe.nim2
-rw-r--r--tests/parallel/tgc_unsafe2.nim2
-rw-r--r--tests/stdlib/tmitems.nim4
-rw-r--r--tests/threads/threadex.nim2
-rw-r--r--tests/threads/ttryrecv.nim4
7 files changed, 12 insertions, 12 deletions
diff --git a/tests/closure/tclosure4.nim b/tests/closure/tclosure4.nim
index 10c7cac54..69c076cd5 100644
--- a/tests/closure/tclosure4.nim
+++ b/tests/closure/tclosure4.nim
@@ -1,13 +1,13 @@
 
 import json, tables, sequtils
 
-proc run(json_params: TTable) =
+proc run(json_params: Table) =
   let json_elems = json_params["files"].elems
   # These fail compilation.
-  var files = map(json_elems, proc (x: PJsonNode): string = x.str)
-  #var files = json_elems.map do (x: PJsonNode) -> string: x.str
+  var files = map(json_elems, proc (x: JsonNode): string = x.str)
+  #var files = json_elems.map do (x: JsonNode) -> string: x.str
   echo "Hey!"
 
 when isMainModule:
   let text = """{"files": ["a", "b", "c"]}"""
-  run(toTable((text.parseJson).fields))
+  run((text.parseJson).fields)
diff --git a/tests/parallel/tarray_of_channels.nim b/tests/parallel/tarray_of_channels.nim
index 11b523401..90ae8369c 100644
--- a/tests/parallel/tarray_of_channels.nim
+++ b/tests/parallel/tarray_of_channels.nim
@@ -1,7 +1,7 @@
 # bug #2257
 import threadpool
 
-type StringChannel = TChannel[string]
+type StringChannel = Channel[string]
 var channels: array[1..3, StringChannel]
 
 type
diff --git a/tests/parallel/tgc_unsafe.nim b/tests/parallel/tgc_unsafe.nim
index 6548bbec8..a4d96cd73 100644
--- a/tests/parallel/tgc_unsafe.nim
+++ b/tests/parallel/tgc_unsafe.nim
@@ -6,7 +6,7 @@ discard """
 # bug #2257
 import threadpool
 
-type StringChannel = TChannel[string]
+type StringChannel = Channel[string]
 var channels: array[1..3, StringChannel]
 
 type
diff --git a/tests/parallel/tgc_unsafe2.nim b/tests/parallel/tgc_unsafe2.nim
index ec4605fe9..4a5f36f6d 100644
--- a/tests/parallel/tgc_unsafe2.nim
+++ b/tests/parallel/tgc_unsafe2.nim
@@ -9,7 +9,7 @@ tgc_unsafe2.nim(28, 5) Error: 'consumer' is not GC-safe as it calls 'track'
 
 import threadpool
 
-type StringChannel = TChannel[string]
+type StringChannel = Channel[string]
 var channels: array[1..3, StringChannel]
 
 type
diff --git a/tests/stdlib/tmitems.nim b/tests/stdlib/tmitems.nim
index 27ff344e5..c713d91a4 100644
--- a/tests/stdlib/tmitems.nim
+++ b/tests/stdlib/tmitems.nim
@@ -11,7 +11,7 @@ fpqeew
 [11, 12, 13]
 [11, 12, 13]
 [11, 12, 13]
-{"key1":11,"key2":12,"key3":13}
+11 12 13
 [11,12,13]
 <Students>
   <Student Name="Aprilfoo" />
@@ -115,7 +115,7 @@ block:
   var j = parseJson """{"key1": 1, "key2": 2, "key3": 3}"""
   for key,val in j.pairs:
     val.num += 10
-  echo j
+  echo j["key1"], " ", j["key2"], " ", j["key3"]
 
 block:
   var j = parseJson """[1, 2, 3]"""
diff --git a/tests/threads/threadex.nim b/tests/threads/threadex.nim
index 00d0992a5..442e80189 100644
--- a/tests/threads/threadex.nim
+++ b/tests/threads/threadex.nim
@@ -12,7 +12,7 @@ type
 
 var
   producer, consumer: Thread[void]
-  chan: TChannel[TMsg]
+  chan: Channel[TMsg]
   printedLines = 0
 
 proc consume() {.thread.} =
diff --git a/tests/threads/ttryrecv.nim b/tests/threads/ttryrecv.nim
index fc1f21321..be79fadae 100644
--- a/tests/threads/ttryrecv.nim
+++ b/tests/threads/ttryrecv.nim
@@ -7,7 +7,7 @@ discard """
 from math import random
 from os import sleep
 
-type PComm = ptr TChannel[int]
+type PComm = ptr Channel[int]
 
 proc doAction(outC: PComm) {.thread.} =
   for i in 0.. <5:
@@ -16,7 +16,7 @@ proc doAction(outC: PComm) {.thread.} =
 
 var
   thr: Thread[PComm]
-  chan: TChannel[int]
+  chan: Channel[int]
 
 open(chan)
 createThread[PComm](thr, doAction, addr(chan))