Skip to content

Commit

Permalink
More fixes for assertEqualsWithDelta() assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
landy2005 committed Nov 2, 2023
1 parent d2d46cb commit 1c4c0cb
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/PhysicalQuantity/AreaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function testToDecare(): void
public function testToDecimeterSquare(): void
{
$area = new Area(1, 'm^2');
$this->assertEquals(100, $area->toUnit('dm^2'));
$this->assertEqualsWithDelta(100, $area->toUnit('dm^2'), 0.000001);
$area = new Area(100, 'm^2');
$this->assertEquals(10000, $area->toUnit('dm^2'));
}
Expand Down
2 changes: 1 addition & 1 deletion tests/PhysicalQuantity/LengthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function testToMegameters(): void
public function testToInches(): void
{
$quantity = new Length(2, 'ft');
$this->assertEquals(24, $quantity->toUnit('in'));
$this->assertEqualsWithDelta(24, $quantity->toUnit('in'), 0.000001);
}

public function testToNauticalMiles(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/PhysicalQuantity/VolumeFlowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function testToCubicDecimeterSecond(): void
}
}
*/
$this->assertEquals(1000, $area->toUnit('dm^3/s'));
$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'));
}
Expand All @@ -373,7 +373,7 @@ public function testToLitresSecond(): void
public function testToMilliLitresSecond(): void
{
$area = new VolumeFlow(1, 'l/s');
$this->assertEquals(1000, $area->toUnit('ml/s'));
$this->assertEqualsWithDelta(1000, $area->toUnit('ml/s'), 0.000001);
$area = new VolumeFlow(100, 'l/s');
$this->assertEquals(100000, $area->toUnit('ml/s'));
}
Expand Down
4 changes: 2 additions & 2 deletions tests/PhysicalQuantity/VolumeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function instantiateTestQuantity(): PhysicalQuantityInterface
public function testToCubicDecimeter(): void
{
$area = new Volume(1, 'm^3');
$this->assertEquals(1000, $area->toUnit('dm^3'));
$this->assertEqualsWithDelta(1000, $area->toUnit('dm^3'), 0.000001);
$area = new Volume(100, 'm^3');
$this->assertEquals(100000, $area->toUnit('dm^3'));
}
Expand All @@ -117,7 +117,7 @@ public function testToLitres(): void
public function testToMilliLitres(): void
{
$area = new Volume(1, 'l');
$this->assertEquals(1000, $area->toUnit('ml'));
$this->assertEqualsWithDelta(1000, $area->toUnit('ml'), 0.000001);
$area = new Volume(100, 'l');
$this->assertEquals(100000, $area->toUnit('ml'));
}
Expand Down

0 comments on commit 1c4c0cb

Please sign in to comment.