summary refs log tree commit diff stats
path: root/tests/parallel/tconvexhull.nim
diff options
context:
space:
mode:
authorMiran <narimiran@users.noreply.github.com>2018-10-17 19:46:42 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-10-17 19:46:42 +0200
commit95504caa31df4cb4e86b03fd38d729b2ddb1d439 (patch)
tree13282df544a279c16dd31fa63751645431ed562e /tests/parallel/tconvexhull.nim
parent81e33b9d874cd400d61b0e9df21e7367ea430dc3 (diff)
downloadNim-95504caa31df4cb4e86b03fd38d729b2ddb1d439.tar.gz
make some tests faster (#9413)
* remove duplicated slow test

* smaller `convex hull`

* smaller sleep

* faster `trtree`

* smaller sleep in `tfuturestream`
Diffstat (limited to 'tests/parallel/tconvexhull.nim')
-rw-r--r--tests/parallel/tconvexhull.nim14
1 files changed, 5 insertions, 9 deletions
diff --git a/tests/parallel/tconvexhull.nim b/tests/parallel/tconvexhull.nim
index c4990bf2d..cc01b5c78 100644
--- a/tests/parallel/tconvexhull.nim
+++ b/tests/parallel/tconvexhull.nim
@@ -1,10 +1,6 @@
 discard """
-  output: '''true
-true
-true
-true
-true
-true'''
+  output: '''
+'''
 
 ccodeCheck: "\\i ! @'deepCopy(' .*"
 """
@@ -55,10 +51,10 @@ proc convex_hull[T](points: var seq[T], cmp: proc(x, y: T): int {.closure.}) : s
       ul[k] = spawn half[T](points, k == 0)
   result = concat(^ul[0], ^ul[1])
 
-var s = map(toSeq(0..999999), proc(x: int): Point = (float(x div 1000), float(x mod 1000)))
+var s = map(toSeq(0..99999), proc(x: int): Point = (float(x div 1000), float(x mod 1000)))
 setMaxPoolSize 2
 
 #echo convex_hull[Point](s, cmpPoint)
 for i in 0..5:
-  echo convex_hull[Point](s, cmpPoint) ==
-      @[(0.0, 0.0), (999.0, 0.0), (999.0, 999.0), (0.0, 999.0)]
+  doAssert convex_hull[Point](s, cmpPoint) ==
+      @[(0.0, 0.0), (99.0, 0.0), (99.0, 999.0), (0.0, 999.0)]