Skip to content

Commit 0312baa

Browse files
author
Alex Vlasov
committed
php 7.0 unit tests fixes - correct octal numbers
1 parent 527bb18 commit 0312baa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/Moontoast/Math/BigNumberTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ public function testBaseConvert()
619619
{
620620
$fromBase = array(2, 8, 10, 16, 36);
621621
$toBase = array(2, 8, 10, 16, 36);
622-
$convertValues = array(10, 27, 39, 039, 0x5F, '10', '27', '39', '5F', '5f', '3XYZ', '3xyz', '5f$@');
622+
$convertValues = array(10, 27, 39, 037, 0x5F, '10', '27', '39', '5F', '5f', '3XYZ', '3xyz', '5f$@');
623623

624624
foreach ($fromBase as $from) {
625625
foreach ($toBase as $to) {
@@ -643,7 +643,7 @@ public function testBaseConvert()
643643
public function testConvertFromBase10()
644644
{
645645
$toBase = array(2, 8, 10, 16, 36);
646-
$convertValues = array(10, 27, 39, 039, 0x5F, '10', '27', '39');
646+
$convertValues = array(10, 27, 39, 037, 0x5F, '10', '27', '39');
647647

648648
foreach ($toBase as $to) {
649649
foreach ($convertValues as $val) {
@@ -685,7 +685,7 @@ public function testConvertFromBase10ExceptionBaseGreaterThan36()
685685
public function testConvertFromBase10NegativeNumbers()
686686
{
687687
$toBase = array(2, 8, 10, 16, 36);
688-
$convertValues = array(-10, -27, -39, -039, -0x5F, '-10', '-27', '-39');
688+
$convertValues = array(-10, -27, -39, -037, -0x5F, '-10', '-27', '-39');
689689

690690
foreach ($toBase as $to) {
691691
foreach ($convertValues as $val) {
@@ -707,7 +707,7 @@ public function testConvertFromBase10NegativeNumbers()
707707
public function testConvertToBase10()
708708
{
709709
$fromBase = array(2, 8, 10, 16, 36);
710-
$convertValues = array(10, 27, 39, 039, 0x5F, '10', '27', '39', '5F', '5f', '3XYZ', '3xyz', '5f$@');
710+
$convertValues = array(10, 27, 39, 037, 0x5F, '10', '27', '39', '5F', '5f', '3XYZ', '3xyz', '5f$@');
711711

712712
foreach ($fromBase as $from) {
713713
foreach ($convertValues as $val) {

0 commit comments

Comments
 (0)