reduce the failure probability of a lua random unit test

It seemed to spuriously pass on travis when it should be failing,
this should be much more unlikely now.
This commit is contained in:
Chris Beck 2014-12-19 22:51:30 -05:00
parent 2d5ef39d5b
commit 2396cfc937

View file

@ -3,11 +3,12 @@
# We use the unsynced rng, lua.random, to achieve this.
# Basically we keep giving side 1 a random amount of gold and recruiting as
# many woses as possible, killing them immediately to make space. We do this
# for 30 turns. In the replay we will actually have a random amount of gold
# for 60 turns. In the replay we will actually have a random amount of gold
# each time, so if we have bad luck one turn we won't have enough to afford
# that many woses.
# For each turn its about 50-50 not to go out of sync, so the chance not to
# go out of sync should be roughly less than one in a billion.
# go out of sync (for true randomness) would be ~ 2^{-60}.
# (However none of our generators use more than 32 bits per seed.)
#define TEST_BREAK_REPLAY ID GET_RND_NUM
{GENERIC_UNIT_TEST {ID} (
@ -54,7 +55,7 @@
[/end_turn]
[/event]
[event]
name = side 2 turn 30
name = side 2 turn 60
{RETURN ([true][/true])}
[/event]
[event]