You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ext/random/tests/engine/xoshiro256starstar_seed.phpt
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,30 @@ try {
18
18
echo$e->getMessage() . PHP_EOL;
19
19
}
20
20
21
+
$engine = new \Random\Engine\Xoshiro256StarStar("\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08\x01\x02\x03\x04\x05\x06\x07\x08");
22
+
23
+
\var_dump($engine);
24
+
25
+
for ($i = 0; $i < 1000; $i++) {
26
+
$engine->generate();
27
+
}
28
+
\var_dump(\bin2hex($engine->generate()));
29
+
21
30
?>
22
-
--EXPECT--
31
+
--EXPECTF--
23
32
Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) must be of type string|int, float given
24
33
Random\Engine\Xoshiro256StarStar::__construct(): Argument #1 ($seed) state strings must be 32 bytes
0 commit comments