diff --git a/test/Common/BitArrayTest.php b/test/Common/BitArrayTest.php index 84aefc2..75e3b28 100644 --- a/test/Common/BitArrayTest.php +++ b/test/Common/BitArrayTest.php @@ -89,7 +89,7 @@ public function testGetNextSet4() : void public function testGetNextSet5() : void { - mt_srand(0xdeadbeef, MT_RAND_PHP); + mt_srand(0xdeadbeef); for ($i = 0; $i < 10; ++$i) { $array = new BitArray(mt_rand(1, 100)); diff --git a/test/Common/ReedSolomonCodecTest.php b/test/Common/ReedSolomonCodecTest.php index 1c1b699..cdc4366 100644 --- a/test/Common/ReedSolomonCodecTest.php +++ b/test/Common/ReedSolomonCodecTest.php @@ -26,7 +26,7 @@ public static function tabs() : array #[DataProvider('tabs')] public function testCodec(int $symbolSize, int $generatorPoly, int $firstRoot, int $primitive, int $numRoots) : void { - mt_srand(0xdeadbeef, MT_RAND_PHP); + mt_srand(0xdeadbeef); $blockSize = (1 << $symbolSize) - 1; $dataSize = $blockSize - $numRoots; @@ -60,7 +60,7 @@ public function testCodec(int $symbolSize, int $generatorPoly, int $firstRoot, i $errorValue = mt_rand(1, $blockSize); do { - $errorLocation = mt_rand(0, $blockSize); + $errorLocation = mt_rand(0, $blockSize - 1); } while (0 !== $errorLocations[$errorLocation]); $errorLocations[$errorLocation] = 1;