Skip to content

Commit

Permalink
Make checks for volume pass within reasaonable ranges
Browse files Browse the repository at this point in the history
Relying on volumes down to the ml allows us to make changes to volume
calculations, and keep the tests withing reasaonable boundaries.

references #74263
  • Loading branch information
feinorgh committed Jun 11, 2024
1 parent 8850226 commit e1a257b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tests/char_volume_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,23 @@ TEST_CASE( "character_baseline_volumes", "[volume]" )
Character &you = get_player_character();
REQUIRE( you.get_mutations().empty() );
REQUIRE( you.height() == 175 );
CHECK( ( you.get_base_volume() > 55_liter && you.get_base_volume() < 80_liter ) );

REQUIRE( your_height_with_trait( trait_SMALL2 ) == 70 );
CHECK( your_volume_with_trait( trait_SMALL2 ) == 23326_ml );
CHECK( ( your_volume_with_trait( trait_SMALL2 ) > 20_liter &&
your_volume_with_trait( trait_SMALL2 ) < 30_liter ) );

REQUIRE( your_height_with_trait( trait_SMALL ) == 122 );
CHECK( your_volume_with_trait( trait_SMALL ) == 42476_ml );
CHECK( ( your_volume_with_trait( trait_SMALL ) > 40_liter &&
your_volume_with_trait( trait_SMALL ) < 50_liter ) );

REQUIRE( your_height_with_trait( trait_LARGE ) == 227 );
CHECK( your_volume_with_trait( trait_LARGE ) == 116034_ml );
CHECK( ( your_volume_with_trait( trait_LARGE ) > 100_liter &&
your_volume_with_trait( trait_LARGE ) < 120_liter ) );

REQUIRE( your_height_with_trait( trait_HUGE ) == 280 );
CHECK( your_volume_with_trait( trait_HUGE ) == 156228_ml );
CHECK( ( your_volume_with_trait( trait_HUGE ) > 150_liter &&
your_volume_with_trait( trait_HUGE ) < 200_liter ) );
}

TEST_CASE( "character_at_volume_can_or_cannot_enter_vehicle", "[volume]" )
Expand Down

0 comments on commit e1a257b

Please sign in to comment.