From e9d99a66834c5aeb79497af354e4ddd3db6454ab Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sun, 26 May 2019 11:14:58 -0500 Subject: [PATCH] Tests/BigInteger: add unit test for 0 loaded as base-10 --- tests/Unit/Math/BigInteger/TestCase.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/Unit/Math/BigInteger/TestCase.php b/tests/Unit/Math/BigInteger/TestCase.php index e7f7bbeb..821e4280 100644 --- a/tests/Unit/Math/BigInteger/TestCase.php +++ b/tests/Unit/Math/BigInteger/TestCase.php @@ -406,4 +406,10 @@ abstract class Unit_Math_BigInteger_TestCase extends PhpseclibTestCase $temp = $this->getInstance(48); $this->assertSame($temp->toHex(true), '30'); } + + public function testZeroBase10() + { + $temp = $this->getInstance('00'); + $this->assertSame($temp->toString(), '0'); + } }