mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Fixes tests rng (#3433)
* Seed RNG before setUp Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
This commit is contained in:
parent
0a6c0261fe
commit
8ab2fbd9a2
@ -6,7 +6,7 @@
|
|||||||
// Therefore the maximum error is 8*3584, or 28672.
|
// Therefore the maximum error is 8*3584, or 28672.
|
||||||
#define SHUFFLE_TEST_IMPL \
|
#define SHUFFLE_TEST_IMPL \
|
||||||
u32 i, j, error; \
|
u32 i, j, error; \
|
||||||
u16 indexSum[7]; \
|
u16 indexSum[8]; \
|
||||||
memset(indexSum, 0, sizeof(indexSum)); \
|
memset(indexSum, 0, sizeof(indexSum)); \
|
||||||
for (i = 0; i < 1024; i++) \
|
for (i = 0; i < 1024; i++) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -201,6 +201,8 @@ void CB2_TestRunner(void)
|
|||||||
case STATE_RUN_TEST:
|
case STATE_RUN_TEST:
|
||||||
gTestRunnerState.state = STATE_REPORT_RESULT;
|
gTestRunnerState.state = STATE_REPORT_RESULT;
|
||||||
sCurrentTest.state = CURRENT_TEST_STATE_RUN;
|
sCurrentTest.state = CURRENT_TEST_STATE_RUN;
|
||||||
|
SeedRng(0);
|
||||||
|
SeedRng2(0);
|
||||||
if (gTestRunnerState.test->runner->setUp)
|
if (gTestRunnerState.test->runner->setUp)
|
||||||
gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data);
|
gTestRunnerState.test->runner->setUp(gTestRunnerState.test->data);
|
||||||
// NOTE: Assumes that the compiler interns __FILE__.
|
// NOTE: Assumes that the compiler interns __FILE__.
|
||||||
|
Loading…
Reference in New Issue
Block a user