forked from github/server
fix intermittent test because sometimes regions contained mallorn.
This commit is contained in:
parent
ec04bf5035
commit
e5947f432e
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue