diff --git a/tests/stats_tracker_test.cpp b/tests/stats_tracker_test.cpp index c03ffbe08bf42..aeff91fe5436e 100644 --- a/tests/stats_tracker_test.cpp +++ b/tests/stats_tracker_test.cpp @@ -486,6 +486,26 @@ TEST_CASE( "achievments_tracker", "[stats]" ) CHECK( achievements_completed.count( a_survive_one_day ) ); } + SECTION( "hidden_kills" ) { + const character_id u_id = g->u.getID(); + const mtype_id mon_zombie( "mon_zombie" ); + const cata::event avatar_zombie_kill = + cata::event::make( u_id, mon_zombie ); + + string_id a_kill_10( "achievement_kill_10_monsters" ); + string_id a_kill_100( "achievement_kill_100_monsters" ); + + b.send( u_id ); + + CHECK( !a.is_hidden( &*a_kill_10 ) ); + CHECK( a.is_hidden( &*a_kill_100 ) ); + for( int i = 0; i < 10; ++i ) { + b.send( avatar_zombie_kill ); + } + CHECK( !a.is_hidden( &*a_kill_10 ) ); + CHECK( !a.is_hidden( &*a_kill_100 ) ); + } + SECTION( "kills" ) { time_duration time_since_game_start = GENERATE( 30_seconds, 10_minutes ); CAPTURE( time_since_game_start );