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:
parent
8aecafc92f
commit
8879fa0018
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user