#include #include namespace kurator { namespace tests { const universe::TurretType LOW { "", 1, 10.0, 1.0, 0.0, 1000.0, 0.05, 0.2, }; const universe::TurretType HIGH { "", 1, 1000.0, 1.0, 0.0, 1000.0, 0.05, 0.2, }; TEST(TurretType, effective_range) { const auto low = LOW.effective_range(); EXPECT_LE(1.0, LOW.range_modifier(low - 1.0) * LOW.base_damage); EXPECT_GE(1.0, LOW.range_modifier(low + 1.0) * LOW.base_damage); const auto high = HIGH.effective_range(); EXPECT_LE(1.0, HIGH.range_modifier(high - 1.0) * HIGH.base_damage); EXPECT_GE(1.0, HIGH.range_modifier(high + 1.0) * HIGH.base_damage); } } // namespace tests } // namespace kurator