From ade48c2cb12d608edd7c64ab07eb9b4172b08517 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 26 May 2019 12:13:54 -0500 Subject: [PATCH] Tests/BigInteger: GMP engine didn't always return 1 or -1 --- tests/Unit/Math/BigInteger/TestCase.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php index 821e4280..103b5c6a 100644 --- a/tests/Unit/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -185,6 +185,9 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase // c < d $this->assertLessThan(0, $c->compare($d)); $this->assertGreaterThan(0, $d->compare($c)); + + $this->assertSame(-1, $this->getInstance(-999)->compare($this->getInstance(370))); + $this->assertSame(1, $this->getInstance(999)->compare($this->getInstance(-700))); } public function testBitwiseAND()