diff options
Diffstat (limited to 'tests/errhangtest.lua')
-rw-r--r-- | tests/errhangtest.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/errhangtest.lua b/tests/errhangtest.lua index fff0dee..5b3f0c0 100644 --- a/tests/errhangtest.lua +++ b/tests/errhangtest.lua | |||
@@ -19,7 +19,6 @@ end | |||
19 | if true then | 19 | if true then |
20 | print "\n#### reserved sentinels" | 20 | print "\n#### reserved sentinels" |
21 | print(pcall(linda.set, linda, lanes.cancel_error)) | 21 | print(pcall(linda.set, linda, lanes.cancel_error)) |
22 | print(pcall(linda.set, linda, linda.batched)) | ||
23 | local _count, _val = linda:get("test") | 22 | local _count, _val = linda:get("test") |
24 | assert(_count == 0 and _val == nil) | 23 | assert(_count == 0 and _val == nil) |
25 | print "OK" | 24 | print "OK" |
@@ -28,13 +27,13 @@ end | |||
28 | -- get/set a few values | 27 | -- get/set a few values |
29 | if true then | 28 | if true then |
30 | print "\n#### set 3 -> receive batched" | 29 | print "\n#### set 3 -> receive batched" |
31 | assert.fails(function() linda:receive(linda.batched, "some key", -1, 1) end) | 30 | assert.fails(function() linda:receive_batched("some key", -1, 1) end) |
32 | assert.fails(function() linda:receive(linda.batched, "some key", 2, 1) end) | 31 | assert.fails(function() linda:receive_batched("some key", 2, 1) end) |
33 | assert.failsnot(function() linda:receive(0, linda.batched, "some key", 1, 3) end) | 32 | assert.failsnot(function() linda:receive_batched(0, "some key", 1, 3) end) |
34 | local fun = function() print "function test ok" end | 33 | local fun = function() print "function test ok" end |
35 | print(pcall(linda.set, linda, 'test', true, nil, fun)) | 34 | print(pcall(linda.set, linda, 'test', true, nil, fun)) |
36 | -- read back the contents | 35 | -- read back the contents |
37 | local k,b,n,f = linda:receive(linda.batched, 'test', 3) | 36 | local k,b,n,f = linda:receive_batched('test', 3) |
38 | local _count, _val = linda:get("test") | 37 | local _count, _val = linda:get("test") |
39 | assert(_count == 0 and _val == nil) | 38 | assert(_count == 0 and _val == nil) |
40 | -- check they are ok | 39 | -- check they are ok |