Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
Trying out mutation testing (infection).
  • Loading branch information
BenMorel committed Dec 24, 2019
1 parent 243ab3e commit e793795
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/BigDecimalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,12 @@ public function providerOfUnscaledValue()
];
}

public function testOfUnscaledValueWithDefaultScale()
{
$number = BigDecimal::ofUnscaledValue('123456789');
$this->assertBigDecimalInternalValues('123456789', 0, $number);
}

/**
* @expectedException \InvalidArgumentException
*/
Expand Down Expand Up @@ -633,6 +639,11 @@ public function providerMultipliedBy()
['123.00', '999.0', '122877000', 3],
['123.00', '999.00', '1228770000', 4],

['123.0', '0.1', '1230', 2],
['123.0', '0.01', '1230', 3],
['123.1', '0.01', '1231', 3],
['123.1', '0.001', '1231', 4],

['123', '-999', '-122877', 0],
['123', '-999.0', '-1228770', 1],
['123', '-999.00', '-12287700', 2],
Expand Down

0 comments on commit e793795

Please sign in to comment.