diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php index d5a6b75b..3338aadb 100644 --- a/tests/Unit/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -212,6 +212,18 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase $z = $this->getInstance('BC98BC98BC98BC98BC98BC98', 16); $this->assertSame($z->toHex(), $x->bitwise_XOR($y)->toHex()); + + // @group github1245 + + $a = $this->getInstance(1); + $b = $this->getInstance(-2); + $c = $a->bitwise_xor($b); + $this->assertSame("$c", '3'); + + $a = $this->getInstance('-6725760161961546982'); + $b = $this->getInstance(51); + $c = $a->bitwise_xor($b); + $this->assertSame("$c", '6725760161961546965'); } public function testBitwiseNOT()