summary refs log tree commit diff stats
path: root/tests/parallel
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-11-05 11:05:46 +0100
committerMiran <narimiran@disroot.org>2019-11-05 11:05:46 +0100
commit3ba3307d61319984e3e8b1061f38402d53cf8f60 (patch)
treed01213de137a5f3216b5c8cf4cacb16c06c686e6 /tests/parallel
parentffa9a7405fe55f91d3816d3cf4b3b1b82ede21ff (diff)
downloadNim-3ba3307d61319984e3e8b1061f38402d53cf8f60.tar.gz
remove deprecated procs (#12535)
Diffstat (limited to 'tests/parallel')
-rw-r--r--tests/parallel/tmissing_deepcopy.nim4
-rw-r--r--tests/parallel/tsimple_array_checks.nim4
-rw-r--r--tests/parallel/twrong_refcounts.nim56
3 files changed, 4 insertions, 60 deletions
diff --git a/tests/parallel/tmissing_deepcopy.nim b/tests/parallel/tmissing_deepcopy.nim
index 694eb77db..94e027b60 100644
--- a/tests/parallel/tmissing_deepcopy.nim
+++ b/tests/parallel/tmissing_deepcopy.nim
@@ -26,9 +26,9 @@ proc greet(p:Person) =
     " friend:", p.friend.name, "(", cast[int](addr p.friend.name),") }"
 
 proc setup =
-  for i in 0 .. <20:
+  for i in 0 ..< 20:
     people.add newPerson("Person" & $(i + 1))
-  for i in 0 .. <20:
+  for i in 0 ..< 20:
     people[i].friend = people[19-i]
 
 proc update =
diff --git a/tests/parallel/tsimple_array_checks.nim b/tests/parallel/tsimple_array_checks.nim
index 5d6e87efe..650b809e0 100644
--- a/tests/parallel/tsimple_array_checks.nim
+++ b/tests/parallel/tsimple_array_checks.nim
@@ -35,9 +35,9 @@ proc main =
   parallel:
     for n in nums: # Error: cannot prove: i <= len(nums) + -1
       spawn log(n)
-    #for i in 0 .. <nums.len: # Error: cannot prove: i <= len(nums) + -1
+    #for i in 0 ..< nums.len: # Error: cannot prove: i <= len(nums) + -1
     #for i in 0 .. nums.len-1: # WORKS!
-    #for i in 0 .. <nums.len: # WORKS!
+    #for i in 0 ..< nums.len: # WORKS!
     #  spawn log(nums[i])
 
 # Array needs explicit size to work, probably related to issue #2287
diff --git a/tests/parallel/twrong_refcounts.nim b/tests/parallel/twrong_refcounts.nim
deleted file mode 100644
index ed3c1b894..000000000
--- a/tests/parallel/twrong_refcounts.nim
+++ /dev/null
@@ -1,56 +0,0 @@
-discard """
-  output: "Success"
-  target: "c"
-"""
-
-# Note: target: "cpp" fails because we can't yet have `extern "C"` mangling in
-# `exportc` procs.
-import math, random, threadPool
-
-# ---
-
-type
-  Person = object
-    age: int
-    friend: ref Person
-
-var
-  people: seq[ref Person] = @[]
-
-proc newPerson(age:int): ref Person =
-  result.new()
-  result.age = age
-
-proc greet(p:Person) =
-  #echo p.age, ", ", p.friend.age
-  p.friend.age += 1
-
-# ---
-
-proc setup =
-  for i in 0 .. <20:
-    people.add newPerson(i + 1)
-  for i in 0 .. <20:
-    people[i].friend = people[random(20)]
-
-proc update =
-  var countA: array[20, int]
-  var countB: array[20, int]
-
-  for i, p in people:
-    countA[i] = getRefCount(p)
-  parallel:
-    for i in 0 .. people.high:
-      spawn greet(people[i][])
-  for i, p in people:
-    countB[i] = getRefCount(p)
-
-  for i in 0 .. <20:
-    doAssert countA[i] == countB[i]
-  echo "Success"
-
-# ---
-
-when true:
-  setup()
-  update()