summary refs log tree commit diff stats
path: root/tests/parallel
diff options
context:
space:
mode:
authornarimiran <narimiran@disroot.org>2019-05-27 21:51:54 +0200
committernarimiran <narimiran@disroot.org>2019-05-27 21:51:54 +0200
commitc644bf399fdfb21eebc6018f2edf487ef6345dd1 (patch)
tree31728cceaf9aac2128c3a225645503cd789b596e /tests/parallel
parent0fc42fc4f702a719c8203f525e9bfbb3163a6c32 (diff)
downloadNim-c644bf399fdfb21eebc6018f2edf487ef6345dd1.tar.gz
tsendtwice test: make it arch-independent
Diffstat (limited to 'tests/parallel')
-rw-r--r--tests/parallel/tsendtwice.nim26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/parallel/tsendtwice.nim b/tests/parallel/tsendtwice.nim
index 0c923177a..b9b8b3aee 100644
--- a/tests/parallel/tsendtwice.nim
+++ b/tests/parallel/tsendtwice.nim
@@ -1,11 +1,11 @@
 discard """
-  output: '''obj2 @[]
-obj @[]
-obj3 @[]
-3
+  output: '''ob @[]
+ob3 @[]
 obj2 @[]
-obj @[]
-obj3 @[]'''
+3
+ob @[]
+ob3 @[]
+ob2 @[]'''
   cmd: "nim c -r --threads:on $file"
 """
 
@@ -30,24 +30,24 @@ type
 var globalTable {.threadvar.}: TableRef[string, Base]
 globalTable = newTable[string, Base]()
 let d = new(Derived)
-globalTable.add("obj", d)
-globalTable.add("obj2", d)
-globalTable.add("obj3", d)
+globalTable.add("ob", d)
+globalTable.add("ob2", d)
+globalTable.add("ob3", d)
 
 proc testThread(channel: ptr TableChannel) {.thread.} =
   globalTable = channel[].recv()
   for k, v in pairs globaltable:
     echo k, " ", v.someSeq
   var myObj: Base
-  deepCopy(myObj, globalTable["obj"])
+  deepCopy(myObj, globalTable["ob"])
   myObj.someSeq = newSeq[int](100)
   let table = channel[].recv() # same table
   echo table.len
   for k, v in mpairs table:
     echo k, " ", v.someSeq
-  assert(table.contains("obj")) # fails!
-  assert(table.contains("obj2")) # fails!
-  assert(table.contains("obj3")) # fails!
+  assert(table.contains("ob")) # fails!
+  assert(table.contains("ob2")) # fails!
+  assert(table.contains("ob3")) # fails!
 
 var channel: TableChannel