← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1349682 into lp:widelands

 

GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1349682 into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1349682 in widelands: "Recent changes broke the Lua testsuite"
  https://bugs.launchpad.net/widelands/+bug/1349682

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1349682/+merge/229248

All fixed now :)

Ran 24 tests in 490.263s

OK
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1349682/+merge/229248
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1349682 into lp:widelands.
=== modified file 'test/maps/expedition.wmf/scripting/init.lua'
--- test/maps/expedition.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ test/maps/expedition.wmf/scripting/init.lua	2014-08-01 15:42:28 +0000
@@ -290,14 +290,14 @@
    -- build a lumberjack and see if the ship starts transporting stuff
    p1:place_building("lumberjacks_hut", map:get_field(17, 1), true)
    connected_road(p1, map:get_field(18,2).immovable, "bl,l|", true)
-   while map:get_field(17, 1).immovable.name ~= "lumberjacks_hut" do
+   while map:get_field(17, 1).immovable.descr.name ~= "lumberjacks_hut" do
       sleep(3222)
    end
    assert_equal(1, p1:get_workers("builder"))
 
    -- build a lumberjack and see if the builder gets transported
    p1:place_building("lumberjacks_hut", map:get_field(12, 18), true)
-   while map:get_field(12, 18).immovable.name ~= "lumberjacks_hut" do
+   while map:get_field(12, 18).immovable.descr.name ~= "lumberjacks_hut" do
       sleep(3222)
    end
    assert_equal(1, p1:get_workers("builder"))

=== modified file 'test/maps/lua_persistence.wmf/scripting/test_persistence.lua'
--- test/maps/lua_persistence.wmf/scripting/test_persistence.lua	2014-07-16 06:05:23 +0000
+++ test/maps/lua_persistence.wmf/scripting/test_persistence.lua	2014-08-01 15:42:28 +0000
@@ -90,7 +90,7 @@
    assert_function(c.func)
    assert_equal("I say zonk!", c.func("zonk"))
 
-   assert_equal("spruce_summer_old", tree.name)
+   assert_equal("spruce_summer_old", tree.descr.name)
 
    assert_equal(32, field.x)
    assert_equal(34, field.y)

=== modified file 'test/maps/plain.wmf/scripting/test_fires_do_not_burn_forever.lua'
--- test/maps/plain.wmf/scripting/test_fires_do_not_burn_forever.lua	2014-06-20 14:38:48 +0000
+++ test/maps/plain.wmf/scripting/test_fires_do_not_burn_forever.lua	2014-08-01 15:42:28 +0000
@@ -5,7 +5,7 @@
    sleep(120000)
    local imm = map:get_field(10, 10).immovable
    if imm ~= nil then
-      assert_not_equal("destroyed_building", imm.name)
+      assert_not_equal("destroyed_building", imm.descr.name)
    end
 
    print("# All Tests passed.")

=== modified file 'test/maps/ship_transportation.wmf/scripting/init.lua'
--- test/maps/ship_transportation.wmf/scripting/init.lua	2014-03-25 06:18:48 +0000
+++ test/maps/ship_transportation.wmf/scripting/init.lua	2014-08-01 15:42:28 +0000
@@ -31,7 +31,7 @@
 
 function port2()
    local o = map:get_field(16, 2).immovable
-   if o and o.name == "port" then
+   if o and o.descr.name == "port" then
       return o
    end
    return nil


Follow ups