Skip to content

Commit

Permalink
add test for pow
Browse files Browse the repository at this point in the history
  • Loading branch information
timglabisch committed Jun 24, 2018
1 parent 07125e1 commit 2246614
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/DecimalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,20 @@ public function testReduceScale()
);
}

public function testPow()
{
static::assertSame(
"100",
(string)dec0("10")->pow(dec0("2"))
);

static::assertSame(
"100000",
(string)dec0("10")->pow(dec0("5"))
);

}

public function testToDecimal()
{
$res = dec("0.1256")->toDecimal(2);
Expand Down

0 comments on commit 2246614

Please sign in to comment.