1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-11-27 04:46:26 +01:00

BigInteger: fix unit tests

This commit is contained in:
terrafrost 2014-06-14 20:47:57 -05:00
parent f8f0bd44b7
commit 281a8c669e

View File

@ -274,12 +274,12 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
$rand1 = $min->random($min, $max);
// technically $rand1 can equal $min but with the $min and $max we've
// chosen it's just not that likely
$this->assertTrue($rand1->compareTo($min) > 0);
$this->assertTrue($rand1->compareTo($max) < 0);
$this->assertTrue($rand1->compare($min) > 0);
$this->assertTrue($rand1->compare($max) < 0);
$rand2 = $min->random($max);
$this->assertTrue($rand1->compareTo($min) > 0);
$this->assertTrue($rand1->compareTo($max) < 0);
$this->assertTrue($rand1->compare($min) > 0);
$this->assertTrue($rand1->compare($max) < 0);
$this->assertFalse($rand1->equals($rand2));
}