Skip to content

Commit 0848e0a

Browse files
committed
update Random() tests for 32-bit arch
1 parent b5b45a3 commit 0848e0a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

SampleProjects/TestSomething/test/godmode.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,21 @@ unittest(millis_micros_and_delay)
1717

1818
unittest(random)
1919
{
20+
GodmodeState* state = GODMODE();
21+
state->reset();
2022
randomSeed(1);
23+
assertEqual(state->seed, 1);
24+
2125
unsigned long x;
2226
x = random(4294967293);
2327
assertEqual(4294967292, x);
28+
assertEqual(state->seed, 4294967292);
2429
x = random(50, 100);
25-
assertEqual(83, x);
30+
assertEqual(87, x);
31+
assertEqual(state->seed, 4294967287);
2632
x = random(100);
27-
assertEqual(74, x);
33+
assertEqual(82, x);
34+
assertEqual(state->seed, 4294967282);
2835
}
2936

3037
void myInterruptHandler() {

0 commit comments

Comments
 (0)