From a0699b83b0abc7148fd9a180178f82faa6e36788 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 5 Feb 2023 02:05:34 +0100 Subject: Fixed boundary damage dealing and resulting side effect in totals --- sim/tests/HitPoints.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sim/tests') diff --git a/sim/tests/HitPoints.cpp b/sim/tests/HitPoints.cpp index 8b8ef84..5c90b4f 100644 --- a/sim/tests/HitPoints.cpp +++ b/sim/tests/HitPoints.cpp @@ -30,9 +30,9 @@ TEST(HitPoints, Deal) EXPECT_DOUBLE_EQ(300.0, points.total()); EXPECT_DOUBLE_EQ(50.0, points.deal(100.0)); EXPECT_DOUBLE_EQ(250.0, points.total()); - EXPECT_DOUBLE_EQ(50.0, points.deal(100.0)); - EXPECT_DOUBLE_EQ(200.0, points.total()); - EXPECT_DOUBLE_EQ(100.0, points.deal(125.0)); + EXPECT_DOUBLE_EQ(50.0 + 80.0, points.deal(200.0)); + EXPECT_DOUBLE_EQ(120.0, points.total()); + EXPECT_DOUBLE_EQ(20.0, points.deal(25.0)); EXPECT_DOUBLE_EQ(100.0, points.total()); EXPECT_DOUBLE_EQ(100.0, points.deal(200.0)); EXPECT_DOUBLE_EQ(0.0, points.total()); -- cgit v1.1