Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Common/BitArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions test/Common/ReedSolomonCodecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down