fix intermittent test because sometimes regions contained mallorn.

This commit is contained in:
Enno Rehling 2020-01-19 18:20:12 +01:00
parent ec04bf5035
commit e5947f432e
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,7 @@ function test_no_growth()
set_turn(204) set_turn(204)
assert_equal('spring', get_season()) assert_equal('spring', get_season())
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 0) r:set_resource('seed', 0)
r:set_resource('sapling', 0) r:set_resource('sapling', 0)
r:set_resource('tree', 0) r:set_resource('tree', 0)
@ -29,6 +30,7 @@ function test_spring_growth()
set_turn(204) set_turn(204)
assert_equal('spring', get_season()) assert_equal('spring', get_season())
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 6) r:set_resource('seed', 6)
r:set_resource('sapling', 17) r:set_resource('sapling', 17)
r:set_resource('tree', 0) r:set_resource('tree', 0)
@ -44,6 +46,7 @@ function test_plant_fail()
assert_equal('summer', get_season()) assert_equal('summer', get_season())
local f = faction.create('goblin') local f = faction.create('goblin')
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 0) r:set_resource('seed', 0)
r:set_resource('sapling', 0) r:set_resource('sapling', 0)
r:set_resource('tree', 0) r:set_resource('tree', 0)
@ -64,6 +67,7 @@ function test_plant_summer()
assert_equal('summer', get_season()) assert_equal('summer', get_season())
local f = faction.create('goblin') local f = faction.create('goblin')
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 0) r:set_resource('seed', 0)
r:set_resource('sapling', 0) r:set_resource('sapling', 0)
r:set_resource('tree', 0) r:set_resource('tree', 0)
@ -85,6 +89,7 @@ function test_plant_spring_saplings()
local f = faction.create('goblin') local f = faction.create('goblin')
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
local u = unit.create(f, r) local u = unit.create(f, r)
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 0) r:set_resource('seed', 0)
r:set_resource('sapling', 0) r:set_resource('sapling', 0)
r:set_resource('tree', 0) r:set_resource('tree', 0)
@ -112,6 +117,7 @@ function test_plant_spring_seeds()
local f = faction.create('goblin') local f = faction.create('goblin')
local r = region.create(0, 0, 'plain') local r = region.create(0, 0, 'plain')
local u = unit.create(f, r) local u = unit.create(f, r)
r:set_flag(2, 0) -- no mallorn
r:set_resource('seed', 0) r:set_resource('seed', 0)
r:set_resource('sapling', 0) r:set_resource('sapling', 0)
r:set_resource('tree', 0) r:set_resource('tree', 0)