Skip to content

Commit

Permalink
v2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
sirn-se committed Dec 28, 2023
1 parent 87fbebb commit 3a7d1b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist
- name: Code standard
run: vendor/bin/phpcs --standard=PSR1,PSR12 --encoding=UTF-8 --report=full --colors src tests examples
run: vendor/bin/phpcs --standard=PSR1,PSR12 --encoding=UTF-8 --report=full --colors src tests

coverage:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions tests/FormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public function testFormat(): void
$this->assertEquals('12.35', $numerics->format(12.345678, 2));
$this->assertEquals('-12.34', $numerics->format(-12.34, 2));
$this->assertEquals('1234.56', $numerics->format(1234.56, 2));
$this->assertEquals('1200', $numerics->format(1234.56, -2));
$this->assertEquals('1234.5600000000', $numerics->format(1234.56, 10));
$this->assertEquals('0.12345678912345678380', $numerics->format(0.123456789123456789, 20));
}

/**
Expand Down
3 changes: 3 additions & 0 deletions tests/PrecisionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public function testValidPrecision(): void
$this->assertEquals(1, $numerics->precision(12.30));
$this->assertEquals(2, $numerics->precision(12.34));
$this->assertEquals(2, $numerics->precision(12.340));
$this->assertEquals(6, $numerics->precision(0.123456789123456789));
$this->assertEquals(15, $numerics->precision(0.123456789123456789, true));
$this->assertEquals(0, $numerics->precision(1.0E+25));
}

/**
Expand Down

0 comments on commit 3a7d1b7

Please sign in to comment.