Skip to content

Commit 426a0f9

Browse files
committed
Move NativeCalculator tests to BigInteger tests
1 parent 3f26e9c commit 426a0f9

File tree

2 files changed

+17
-83
lines changed

2 files changed

+17
-83
lines changed

tests/BigIntegerTest.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,7 @@ public static function providerPlus(): array
559559
['5165450198704521651351654564564089798441', '-5165450198704521651351654564564089798441', '0'],
560560
['-5165450198704521651351654564564089798441', '5165450198704521651351654564564089798441', '0'],
561561

562+
['1234567891234567889999999', '1234567891234567889999999', '2469135782469135779999998'],
562563
['3493049309220392055810', '9918493493849898938928310121', '9918496986899208159320365931'],
563564
['546254089287665464650654', '-4654654565726542654005465', '-4108400476438877189354811'],
564565
['-54654654625426504062224', '406546504670332465465435004', '406491850015707038961372780'],
@@ -606,17 +607,24 @@ public function testMultipliedBy(string $a, int|float|string $b, string $r): voi
606607
public static function providerMultipliedBy(): array
607608
{
608609
return [
610+
['0', '0', '0'],
611+
['0', '-1', '0'],
612+
['0', '1', '0'],
613+
['-1', '0', '0'],
614+
['1', '0', '0'],
615+
609616
['123456789098765432101234567890987654321', '1', '123456789098765432101234567890987654321'],
610617
['123456789098765432101234567890987654321', '-1', '-123456789098765432101234567890987654321'],
611618
['1', '123456789098765432101234567890987654321', '123456789098765432101234567890987654321'],
612619
['15892588375910581333', '2485910409339228962451', '39507550875019745254366764864945838527183'],
613620
['341581435989834012309', '-91050393818389238433', '-31101124267925302088072082300643257871797'],
614621
['-1204902920503999920003', '1984389583950290232332', '-2390996805119422027350037939263960284136996'],
615622
['-991230349304902390122', '-3483910549230593053437', '3453357870660875087266990729629471366949314'],
623+
['0', '1234567891234567889999999', '0'],
624+
['1234567891234567889999999', '0', '0'],
616625
['0', '-3483910549230593053437', '0'],
617626
['-991230349304902390122', '0', '0'],
618627

619-
620628
['1274837942798479387498237897498734984', 30, '38245138283954381624947136924962049520'],
621629
['1274837942798479387498237897498734984', 30.0, '38245138283954381624947136924962049520'],
622630
['1274837942798479387498237897498734984', '30', '38245138283954381624947136924962049520'],
@@ -1505,6 +1513,8 @@ public static function providerPower(): array
15051513
['1', 0, '1'],
15061514
['2', 0, '1'],
15071515
['3', 0, '1'],
1516+
['-123456789012345678901234567890', 0, '1'],
1517+
['123456789012345678901234567890', 0, '1'],
15081518

15091519
['-3', 1, '-3'],
15101520
['-2', 1, '-2'],
@@ -1513,6 +1523,8 @@ public static function providerPower(): array
15131523
['1', 1, '1'],
15141524
['2', 1, '2'],
15151525
['3', 1, '3'],
1526+
['-123456789012345678901234567890', 1, '-123456789012345678901234567890'],
1527+
['123456789012345678901234567890', 1, '123456789012345678901234567890'],
15161528

15171529
['-3', 2, '9'],
15181530
['-2', 2, '4'],
@@ -1521,6 +1533,8 @@ public static function providerPower(): array
15211533
['1', 2, '1'],
15221534
['2', 2, '4'],
15231535
['3', 2, '9'],
1536+
['-123456789012345678901234567890', 2, '15241578753238836750495351562536198787501905199875019052100'],
1537+
['123456789012345678901234567890', 2, '15241578753238836750495351562536198787501905199875019052100'],
15241538

15251539
['-3', 3, '-27'],
15261540
['-2', 3, '-8'],
@@ -1529,6 +1543,8 @@ public static function providerPower(): array
15291543
['1', 3, '1'],
15301544
['2', 3, '8'],
15311545
['3', 3, '27'],
1546+
['-123456789012345678901234567890', 3, '-1881676372353657772546716040589641726257477229849409426207693797722198701224860897069000'],
1547+
['123456789012345678901234567890', 3, '1881676372353657772546716040589641726257477229849409426207693797722198701224860897069000'],
15321548

15331549
['0', 1000000, '0'],
15341550
['1', 1000000, '1'],

tests/Internal/Calculator/NativeCalculatorTest.php

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)