Skip to content

Commit

Permalink
the last bist of sight test
Browse files Browse the repository at this point in the history
  • Loading branch information
GuardianDll committed Mar 5, 2024
1 parent 2038e9d commit 53c18ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/mutation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,35 +340,35 @@ TEST_CASE( "Scout_and_Topographagnosia_traits_affect_overmap_sight_range", "[mut
{
Character &dummy = get_player_character();
clear_avatar();
double OM_sight = dummy.overmap_sight_range( 100.0f );
// 100.0f is light value equal to daylight

WHEN( "character has no traits, that change overmap sight range" ) {
THEN( "unchanged sight range" ) {
CHECK( OM_sight == 2.0 );
CHECK( dummy.overmap_sight_range( 100.0f ) == 10.0 );
}
}

WHEN( "character has Scout trait" ) {
dummy.toggle_trait( trait_EAGLEEYED );
THEN( "they have increased overmap sight range" ) {
CHECK( OM_sight == 3.0 );
CHECK( dummy.overmap_sight_range( 100.0f ) == 15.0 );
}
// Regression test for #42853
THEN( "having another trait does not cancel the Scout trait" ) {
dummy.toggle_trait( trait_SMELLY );
CHECK( OM_sight == 4.0 );
CHECK( dummy.overmap_sight_range( 100.0f ) == 15.0 );
}
}

WHEN( "character has Topographagnosia trait" ) {
dummy.toggle_trait( trait_UNOBSERVANT );
THEN( "they have reduced overmap sight range" ) {
CHECK( OM_sight == 5.0 );
CHECK( dummy.overmap_sight_range( 100.0f ) == 1.0 );

Check failure on line 366 in tests/mutation_test.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

3 == 1.0
}
// Regression test for #42853
THEN( "having another trait does not cancel the Topographagnosia trait" ) {
dummy.toggle_trait( trait_SMELLY );
CHECK( OM_sight == 6.0 );
CHECK( dummy.overmap_sight_range( 100.0f ) == 1.0 );

Check failure on line 371 in tests/mutation_test.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

3 == 1.0
}
}
}
Expand Down

0 comments on commit 53c18ab

Please sign in to comment.