1
0
mirror of https://github.com/danog/tgseclib.git synced 2025-01-22 05:51:20 +01:00

Tests/BigInteger: add bitwise_xor test

This commit is contained in:
terrafrost 2018-01-22 00:13:14 -06:00
parent 8aecafc92f
commit 8879fa0018

View File

@ -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()