Make get and call_sync error

Signed-off-by: Rahix <rahix@rahix.de>
This commit is contained in:
rahix 2019-04-16 22:08:37 +02:00
parent 4b5fcf3d99
commit 1b73d0d04c
4 changed files with 17 additions and 13 deletions

View file

@ -26,7 +26,9 @@ function test_get_network_robust()
)
assert_equal(123, bc2:get("getrob1"), "wrong value")
assert_nil(bc2:get("getrob2"), "found non-exisiting")
assert_error_match("unknown", function()
bc2:get("getrob2")
end)
end
function test_call_sync_network_robust()

View file

@ -68,7 +68,9 @@ function test_get()
bc:finalize()
assert_equal(1234, bc:get("get1"), "wrong value for noun")
assert_equal(nil, bc:get("get2"), "got value for non-exisiting noun")
assert_error_match("unknown", function()
bc:get("get2")
end)
assert_error_match("not a noun", function()
bc:get("get2v")
end)

View file

@ -28,7 +28,9 @@ function test_get_network()
local bc2 = BaseControl:new()
assert_equal(123, bc2:get("getnw1"), "wrong value")
assert_nil(bc2:get("getnw2"), "found non-exisiting")
assert_error_match("unknown", function()
bc2:unknown("getnw2")
end)
end
function test_call_network()