We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5b45a3 commit 0848e0aCopy full SHA for 0848e0a
SampleProjects/TestSomething/test/godmode.cpp
@@ -17,14 +17,21 @@ unittest(millis_micros_and_delay)
17
18
unittest(random)
19
{
20
+ GodmodeState* state = GODMODE();
21
+ state->reset();
22
randomSeed(1);
23
+ assertEqual(state->seed, 1);
24
+
25
unsigned long x;
26
x = random(4294967293);
27
assertEqual(4294967292, x);
28
+ assertEqual(state->seed, 4294967292);
29
x = random(50, 100);
- assertEqual(83, x);
30
+ assertEqual(87, x);
31
+ assertEqual(state->seed, 4294967287);
32
x = random(100);
- assertEqual(74, x);
33
+ assertEqual(82, x);
34
+ assertEqual(state->seed, 4294967282);
35
}
36
37
void myInterruptHandler() {
0 commit comments