aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/recursive.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/recursive.lua b/tests/recursive.lua
index 97b9c5b..716fe60 100644
--- a/tests/recursive.lua
+++ b/tests/recursive.lua
@@ -4,18 +4,18 @@
4-- Test program for Lua Lanes 4-- Test program for Lua Lanes
5-- 5--
6 6
7io.stderr:write( "depth:" ) 7io.stderr:write("depth: ")
8local function func( depth ) 8local function func( depth )
9 io.stderr:write(" " .. depth) 9 io.stderr:write(depth .. " ")
10 if depth > 10 then 10 if depth <= 0 then
11 return "done!" 11 return "done!"
12 end 12 end
13 13
14 local lanes = require "lanes" 14 local lanes = require "lanes"
15 local lane = lanes.gen("*", func)( depth+1 ) 15 local lane = lanes.gen("*", func)( depth-1 )
16 return lane[1] 16 return lane[1]
17end 17end
18 18
19local v= func(0) 19local v= func(100)
20assert(v=="done!") 20assert(v=="done!")
21io.stderr:write("TEST OK\n") 21io.stderr:write("TEST OK\n")