diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-11 14:58:04 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-11 14:58:04 +0200 |
commit | 5693bdd8353ae6b623fe5b6210daa72983c220d0 (patch) | |
tree | cbe473b56a4491ea5f18c6b7ffe2b3cd453b34e2 /tests/basic.lua | |
parent | 3589b8e04ecc7e02674547c4738a54954f6758bc (diff) | |
download | lanes-5693bdd8353ae6b623fe5b6210daa72983c220d0.tar.gz lanes-5693bdd8353ae6b623fe5b6210daa72983c220d0.tar.bz2 lanes-5693bdd8353ae6b623fe5b6210daa72983c220d0.zip |
Adjust lanes.configure() documentation
Diffstat (limited to 'tests/basic.lua')
-rw-r--r-- | tests/basic.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/basic.lua b/tests/basic.lua index cad3764..bdad44c 100644 --- a/tests/basic.lua +++ b/tests/basic.lua | |||
@@ -7,7 +7,8 @@ | |||
7 | -- - ... | 7 | -- - ... |
8 | -- | 8 | -- |
9 | local config = { with_timers = false, strip_functions = false, internal_allocator = "libc"} | 9 | local config = { with_timers = false, strip_functions = false, internal_allocator = "libc"} |
10 | local require_lanes_result_1, require_lanes_result_2 = require "lanes".configure(config) | 10 | -- calling configure more than once should work (additional called are ignored) |
11 | local require_lanes_result_1, require_lanes_result_2 = require "lanes".configure(config).configure() | ||
11 | print("require_lanes_result:", require_lanes_result_1, require_lanes_result_2) | 12 | print("require_lanes_result:", require_lanes_result_1, require_lanes_result_2) |
12 | local lanes = require_lanes_result_1 | 13 | local lanes = require_lanes_result_1 |
13 | 14 | ||
@@ -434,7 +435,7 @@ local function chunk2(linda) | |||
434 | assert(config.strip_functions and info.short_src=="?" or string.match(info.short_src, "^.*basic.lua$"), "bad info.short_src") | 435 | assert(config.strip_functions and info.short_src=="?" or string.match(info.short_src, "^.*basic.lua$"), "bad info.short_src") |
435 | -- These vary so let's not be picky (they're there..) | 436 | -- These vary so let's not be picky (they're there..) |
436 | -- | 437 | -- |
437 | assert(info.linedefined == 419, "bad linedefined") -- start of 'chunk2' | 438 | assert(info.linedefined == 420, "bad linedefined") -- start of 'chunk2' |
438 | assert(config.strip_functions and info.currentline==-1 or info.currentline > info.linedefined, "bad currentline") -- line of 'debug.getinfo' | 439 | assert(config.strip_functions and info.currentline==-1 or info.currentline > info.linedefined, "bad currentline") -- line of 'debug.getinfo' |
439 | assert(info.lastlinedefined > info.currentline, "bad lastlinedefined") -- end of 'chunk2' | 440 | assert(info.lastlinedefined > info.currentline, "bad lastlinedefined") -- end of 'chunk2' |
440 | local k,func= linda:receive("down") | 441 | local k,func= linda:receive("down") |