diff options
Diffstat (limited to 'tests/parallel')
-rw-r--r-- | tests/parallel/t10913.nim | 2 | ||||
-rw-r--r-- | tests/parallel/t7535.nim | 2 | ||||
-rw-r--r-- | tests/parallel/t9691.nim | 2 | ||||
-rw-r--r-- | tests/parallel/tblocking_channel.nim | 4 | ||||
-rw-r--r-- | tests/parallel/tguard1.nim | 2 | ||||
-rw-r--r-- | tests/parallel/tsendtwice.nim | 21 | ||||
-rw-r--r-- | tests/parallel/tuseafterdef.nim | 1 |
7 files changed, 14 insertions, 20 deletions
diff --git a/tests/parallel/t10913.nim b/tests/parallel/t10913.nim index d8459ecd0..191939100 100644 --- a/tests/parallel/t10913.nim +++ b/tests/parallel/t10913.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--threads:on" + matrix: "--mm:refc; --mm:orc" errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter" """ diff --git a/tests/parallel/t7535.nim b/tests/parallel/t7535.nim index 052dcdc3a..7817a1c9e 100644 --- a/tests/parallel/t7535.nim +++ b/tests/parallel/t7535.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--threads:on" + matrix: "--mm:refc; --mm:orc" errormsg: "'spawn' takes a call expression; got: proc (x: uint32) = echo [x]" """ diff --git a/tests/parallel/t9691.nim b/tests/parallel/t9691.nim index bbf2b1bc7..254f03416 100644 --- a/tests/parallel/t9691.nim +++ b/tests/parallel/t9691.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--threads:on" + matrix: "--mm:refc; --mm:orc" errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter" """ diff --git a/tests/parallel/tblocking_channel.nim b/tests/parallel/tblocking_channel.nim index eb5fcb715..f3ccd166a 100644 --- a/tests/parallel/tblocking_channel.nim +++ b/tests/parallel/tblocking_channel.nim @@ -1,8 +1,8 @@ discard """ output: "" -disabled: "freebsd" +disabled: "freebsd" # see #15725 """ -# disabled pending bug #15725 + import threadpool, os var chan: Channel[int] diff --git a/tests/parallel/tguard1.nim b/tests/parallel/tguard1.nim index b1eb7e7c5..f4c92319b 100644 --- a/tests/parallel/tguard1.nim +++ b/tests/parallel/tguard1.nim @@ -5,7 +5,7 @@ output: "90" when false: template lock(a, b: ptr Lock; body: stmt) = - if cast[ByteAddress](a) < cast[ByteAddress](b): + if cast[int](a) < cast[int](b): pthread_mutex_lock(a) pthread_mutex_lock(b) else: diff --git a/tests/parallel/tsendtwice.nim b/tests/parallel/tsendtwice.nim index 6bf5e5ebb..9f4a2e06e 100644 --- a/tests/parallel/tsendtwice.nim +++ b/tests/parallel/tsendtwice.nim @@ -1,18 +1,10 @@ discard """ - output: '''ob2 @[] -ob @[] -ob3 @[] -3 -ob2 @[] -ob @[] -ob3 @[] -''' matrix: "--mm:refc" """ # bug #4776 -import tables +import tables, algorithm type Base* = ref object of RootObj @@ -35,20 +27,21 @@ globalTable.add("ob", d) globalTable.add("ob2", d) globalTable.add("ob3", d) +proc `<`(x, y: seq[int]): bool = x.len < y.len +proc kvs(t: TableRef[string, Base]): seq[(string, seq[int])] = + for k, v in t.pairs: result.add (k, v.someSeq) + result.sort + 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["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("ob")) # fails! assert(table.contains("ob2")) # fails! assert(table.contains("ob3")) # fails! + assert table.kvs == globalTable.kvs # Last to see above spot checks first var channel: TableChannel diff --git a/tests/parallel/tuseafterdef.nim b/tests/parallel/tuseafterdef.nim index e73f1b794..64f835a1b 100644 --- a/tests/parallel/tuseafterdef.nim +++ b/tests/parallel/tuseafterdef.nim @@ -1,5 +1,6 @@ discard """ matrix: "--mm:refc" + disabled: true errormsg: "(k)..(k) not disjoint from (k)..(k)" line: 24 action: compile |