From 772386ffc7318fea8d0186fa04c6f4709bffdf2a Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 12 Oct 2018 20:46:48 +0200 Subject: [PATCH] debug logging did not help. nothing unusual here, just weirdly intermittent. --- scripts/tests/e3/buildings.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/tests/e3/buildings.lua b/scripts/tests/e3/buildings.lua index 9899d138e..d5ea4fa51 100644 --- a/scripts/tests/e3/buildings.lua +++ b/scripts/tests/e3/buildings.lua @@ -34,22 +34,18 @@ function test_build_watch() local u = unit.create(f, r, 1) u.number = 20 - u:add_item("log", 20) + u:add_item("log", 30) u.id = 42 u:set_skill("building", 1) u:add_order("MACHE Wache") process_orders() assert_not_nil(u.building) - if 5 ~= u.building.size then - -- debug logging to find intermittent errors - for k,v in ipairs(f.messages) do - print(v) - end - end + -- stage two needs skill 2, this unit can only build a first stage: assert_equal(5, u.building.size) u:set_skill("building", 2) + u:clear_orders() u:add_order("MACHE Wache " .. itoa36(u.building.id)) process_orders() assert_not_nil(u.building)