diff --git a/tests/monster_attack_test.cpp b/tests/monster_attack_test.cpp index e313f76a8ea0e..ea470d9466958 100644 --- a/tests/monster_attack_test.cpp +++ b/tests/monster_attack_test.cpp @@ -18,8 +18,9 @@ static constexpr tripoint attacker_location{ 65, 65, 0 }; static void test_monster_attack( const tripoint &target_offset, bool expect_attack, bool expect_vision ) { + int day_hour = hour_of_day( calendar::turn ) ); clear_creatures(); - CAPTURE( hour_of_day( calendar::turn ) ); + CAPTURE( day_hour ); REQUIRE( is_day( calendar::turn ) ); // Monster adjacent to target. const std::string monster_type = "mon_zombie";