Signed-off-by: Rahix <rahix@rahix.de>
dev
rahix 7 years ago
parent 1a9422af7d
commit d6aa1637f1

@ -45,7 +45,7 @@ function test_call_sync_network_robust()
local bc2 = BaseControl:new() local bc2 = BaseControl:new()
local addr2 = network.get_scene() local addr2 = network.get_scene()
assert_nil(bc2:call("syncr1", 20, 12), "call not nil") assert_true(bc2:call("syncr1", 20, 12), "call not true")
network.inject( network.inject(
addr2, addr2,

@ -61,7 +61,7 @@ function test_call_sync()
bc1:finalize() bc1:finalize()
-- Test locally -- Test locally
assert_nil(bc1:call("sync1", 20, 12), "call not nil") assert_true(bc1:call("sync1", 20, 12), "call not true")
local ret, val = bc1:call_sync("sync1", 30, 12) local ret, val = bc1:call_sync("sync1", 30, 12)
assert_equal(40, ret, "local sync not correct") assert_equal(40, ret, "local sync not correct")
assert_equal("hello", val, "local sync not multiple") assert_equal("hello", val, "local sync not multiple")
@ -69,7 +69,7 @@ function test_call_sync()
-- Test remote -- Test remote
local bc2 = BaseControl:new() local bc2 = BaseControl:new()
assert_nil(bc2:call("sync1", 20, 12), "call not nil") assert_true(bc2:call("sync1", 20, 12), "call not true")
local ret, val = bc2:call_sync("sync1", 30, 12) local ret, val = bc2:call_sync("sync1", 30, 12)
assert_equal(40, ret, "local sync not correct") assert_equal(40, ret, "local sync not correct")
assert_equal("hello", val, "local sync not multiple") assert_equal("hello", val, "local sync not multiple")

@ -4,7 +4,7 @@ local network = require("network")
local serialization = require("serialization") local serialization = require("serialization")
local BaseControl = require("bc") local BaseControl = require("bc")
module("network", package.seeall, lunit.testcase) module("timeout", package.seeall, lunit.testcase)
function test_timeout_get() function test_timeout_get()
local bc = BaseControl:new() local bc = BaseControl:new()

Loading…
Cancel
Save