summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/run/tuserassert.nim1
-rw-r--r--tests/specials.nim1
-rw-r--r--tests/threads/trecursive_actor.nim19
3 files changed, 20 insertions, 1 deletions
diff --git a/tests/run/tuserassert.nim b/tests/run/tuserassert.nim
index 958da2fe1..cf12c4e8b 100644
--- a/tests/run/tuserassert.nim
+++ b/tests/run/tuserassert.nim
@@ -5,7 +5,6 @@ discard """
 template myAssert(cond: expr) = 
   when rand(3) < 2:
     let c = cond.astToStr
-    {.warning: "code activated: " & c.}
     if not cond:
       echo c, "ugh"
   
diff --git a/tests/specials.nim b/tests/specials.nim
index 1f3013e90..a1aa1bc5a 100644
--- a/tests/specials.nim
+++ b/tests/specials.nim
@@ -118,6 +118,7 @@ proc runThreadTests(r: var TResults, options: string) =
   
   test "tactors"
   test "threadex"
+  test "trecursive_actor"
   #test "threadring"
   #test "tthreadanalysis"
   #test "tthreadsort"
diff --git a/tests/threads/trecursive_actor.nim b/tests/threads/trecursive_actor.nim
new file mode 100644
index 000000000..e2774704c
--- /dev/null
+++ b/tests/threads/trecursive_actor.nim
@@ -0,0 +1,19 @@
+discard """
+  outputsub: "0"
+"""
+
+import actors
+
+var
+  a: TActorPool[int, void]
+createActorPool(a)
+
+proc task(i: int) {.thread.} =
+  echo i
+  if i != 0: a.spawn (i-1, task)
+
+# count from 9 till 0 and check 0 is somewhere in the output
+a.spawn(9, task)
+a.join()
+
+