From 819ab69a7fb8ddfb80268000451c4c162ea74867 Mon Sep 17 00:00:00 2001 From: Mike Stupalov Date: Thu, 2 Nov 2023 13:17:52 +0300 Subject: [PATCH] More fixes for assertEqualsWithDelta() assets. --- tests/PhysicalQuantity/AreaTest.php | 2 +- tests/PhysicalQuantity/VolumeFlowTest.php | 4 ++-- tests/PhysicalQuantity/VolumeTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/PhysicalQuantity/AreaTest.php b/tests/PhysicalQuantity/AreaTest.php index 7f43102..951b1e1 100644 --- a/tests/PhysicalQuantity/AreaTest.php +++ b/tests/PhysicalQuantity/AreaTest.php @@ -204,7 +204,7 @@ public function testToDecimeterSquare(): void $area = new Area(1, 'm^2'); $this->assertEqualsWithDelta(100, $area->toUnit('dm^2'), 0.000001); $area = new Area(100, 'm^2'); - $this->assertEquals(10000, $area->toUnit('dm^2')); + $this->assertEqualsWithDelta(10000, $area->toUnit('dm^2'), 0.000001); } public function testToMillimeterSquare(): void diff --git a/tests/PhysicalQuantity/VolumeFlowTest.php b/tests/PhysicalQuantity/VolumeFlowTest.php index 65c0b55..59bc8de 100644 --- a/tests/PhysicalQuantity/VolumeFlowTest.php +++ b/tests/PhysicalQuantity/VolumeFlowTest.php @@ -350,7 +350,7 @@ public function testToCubicDecimeterSecond(): void */ $this->assertEqualsWithDelta(1000, $area->toUnit('dm^3/s'), 0.000001); $area = new VolumeFlow(100, 'm^3/s'); - $this->assertEquals(100000, $area->toUnit('dm^3/s')); + $this->assertEqualsWithDelta(100000, $area->toUnit('dm^3/s'), 0.000001); } @@ -375,7 +375,7 @@ public function testToMilliLitresSecond(): void $area = new VolumeFlow(1, 'l/s'); $this->assertEqualsWithDelta(1000, $area->toUnit('ml/s'), 0.000001); $area = new VolumeFlow(100, 'l/s'); - $this->assertEquals(100000, $area->toUnit('ml/s')); + $this->assertEqualsWithDelta(100000, $area->toUnit('ml/s'), 0.000001); } public function testToHectoLitresSecond(): void diff --git a/tests/PhysicalQuantity/VolumeTest.php b/tests/PhysicalQuantity/VolumeTest.php index 95cc80f..e7399e6 100644 --- a/tests/PhysicalQuantity/VolumeTest.php +++ b/tests/PhysicalQuantity/VolumeTest.php @@ -95,7 +95,7 @@ public function testToCubicDecimeter(): void $area = new Volume(1, 'm^3'); $this->assertEqualsWithDelta(1000, $area->toUnit('dm^3'), 0.000001); $area = new Volume(100, 'm^3'); - $this->assertEquals(100000, $area->toUnit('dm^3')); + $this->assertEqualsWithDelta(100000, $area->toUnit('dm^3'), 0.000001); } public function testToCubicMillimeter(): void @@ -119,7 +119,7 @@ public function testToMilliLitres(): void $area = new Volume(1, 'l'); $this->assertEqualsWithDelta(1000, $area->toUnit('ml'), 0.000001); $area = new Volume(100, 'l'); - $this->assertEquals(100000, $area->toUnit('ml')); + $this->assertEqualsWithDelta(100000, $area->toUnit('ml'), 0.000001); } public function testToHectoLitres(): void