6 declare(strict_types=1);
11 use PHPUnit\Framework\TestCase;
36 public function testEq(
float $a,
float $b,
bool $expected)
38 self::assertEquals($expected, $this->comparator->equal($a, $b));
50 [10, 10.000001,
true],
51 [10.0000099, 10.00001,
true],
65 public function testGt(
float $a,
float $b,
bool $expected)
67 self::assertEquals($expected, $this->comparator->greaterThan($a, $b));
78 [10, 10.00001,
false],
79 [10, 10.000001,
false],
80 [10.0000099, 10.00001,
false],
94 public function testGte(
float $a,
float $b,
bool $expected)
96 self::assertEquals($expected, $this->comparator->greaterThanOrEqual($a, $b));
107 [10, 10.00001,
true],
108 [10, 10.000001,
true],
109 [10.0000099, 10.00001,
true],
112 [1.0001, 1.001,
false],
testEq(float $a, float $b, bool $expected)
testGte(float $a, float $b, bool $expected)
testGt(float $a, float $b, bool $expected)