| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 12 | public function testFiniteInfiniteAdd() |
||
| 13 | { |
||
| 14 | $pInf = InfiniteDecimal::getPositiveInfinite(); |
||
| 15 | $nInf = InfiniteDecimal::getNegativeInfinite(); |
||
| 16 | |||
| 17 | $pTen = Decimal::fromInteger(10); |
||
| 18 | $nTen = Decimal::fromInteger(-10); |
||
| 19 | |||
| 20 | $this->assertTrue($pInf->add($pTen)->equals($pInf)); |
||
| 21 | $this->assertTrue($nInf->add($pTen)->equals($nInf)); |
||
| 22 | |||
| 23 | $this->assertTrue($pInf->add($nTen)->equals($pInf)); |
||
| 24 | $this->assertTrue($nInf->add($nTen)->equals($nInf)); |
||
| 25 | |||
| 26 | $this->assertTrue($pTen->add($pInf)->equals($pInf)); |
||
| 27 | $this->assertTrue($pTen->add($nInf)->equals($nInf)); |
||
| 28 | |||
| 29 | $this->assertTrue($nTen->add($pInf)->equals($pInf)); |
||
| 30 | $this->assertTrue($nTen->add($nInf)->equals($nInf)); |
||
| 31 | } |
||
| 32 | |||
| 58 |