diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/basic.lua b/tests/basic.lua index ae8ebd9..6282e3e 100644 --- a/tests/basic.lua +++ b/tests/basic.lua | |||
@@ -92,6 +92,8 @@ local task_launch= lanes_gen("", { globals={hey=true}, gc_cb = gc_cb}, task) | |||
92 | -- 'task_launch' is a factory of multithreaded tasks, we can launch several: | 92 | -- 'task_launch' is a factory of multithreaded tasks, we can launch several: |
93 | 93 | ||
94 | local lane1= task_launch(100,200,3) | 94 | local lane1= task_launch(100,200,3) |
95 | assert.fails(function() print(lane1[lane1]) end) -- indexing the lane with anything other than a string or a number should fail | ||
96 | |||
95 | local lane2= task_launch(200,300,4) | 97 | local lane2= task_launch(200,300,4) |
96 | 98 | ||
97 | -- At this stage, states may be "pending", "running" or "done" | 99 | -- At this stage, states may be "pending", "running" or "done" |
@@ -435,7 +437,7 @@ local function chunk2(linda) | |||
435 | assert(config.strip_functions and info.short_src=="?" or string.match(info.short_src, "^.*basic.lua$"), "bad info.short_src") | 437 | assert(config.strip_functions and info.short_src=="?" or string.match(info.short_src, "^.*basic.lua$"), "bad info.short_src") |
436 | -- These vary so let's not be picky (they're there..) | 438 | -- These vary so let's not be picky (they're there..) |
437 | -- | 439 | -- |
438 | assert(info.linedefined == 420, "bad linedefined") -- start of 'chunk2' | 440 | assert(info.linedefined == 422, "bad linedefined") -- start of 'chunk2' |
439 | assert(config.strip_functions and info.currentline==-1 or info.currentline > info.linedefined, "bad currentline") -- line of 'debug.getinfo' | 441 | assert(config.strip_functions and info.currentline==-1 or info.currentline > info.linedefined, "bad currentline") -- line of 'debug.getinfo' |
440 | assert(info.lastlinedefined > info.currentline, "bad lastlinedefined") -- end of 'chunk2' | 442 | assert(info.lastlinedefined > info.currentline, "bad lastlinedefined") -- end of 'chunk2' |
441 | local k,func= linda:receive("down") | 443 | local k,func= linda:receive("down") |