1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-02 09:38:06 +01:00

Tests/BigInteger: add unit test for randomPrime

This commit is contained in:
terrafrost 2017-10-21 12:25:13 -05:00
parent ce92283c10
commit a59d046c9d

View File

@ -400,4 +400,11 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase
$this->assertSame((string) $min, (string) $class::min($min, $max));
$this->assertSame((string) $min, (string) $class::min($max, $min));
}
public function testRandomPrime()
{
$class = static::getStaticClass();
$prime = $class::randomPrime(128);
$this->assertSame(128, $prime->getLength());
}
}