Merge pull request #889 from ennorehling/develop

fix intermittent tests
This commit is contained in:
Enno Rehling 2020-01-19 18:34:23 +01:00 committed by GitHub
commit 983a6f5426
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

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