diff --git a/tests/char_volume_test.cpp b/tests/char_volume_test.cpp index 20e3c2b380fd0..8c5d50b861e75 100644 --- a/tests/char_volume_test.cpp +++ b/tests/char_volume_test.cpp @@ -9,6 +9,7 @@ #include "map_helpers.h" #include "mutation.h" #include "player_helpers.h" +#include "units.h" #include "vehicle.h" #include "veh_type.h" @@ -42,25 +43,23 @@ TEST_CASE( "character_baseline_volumes", "[volume]" ) { clear_avatar(); Character &you = get_player_character(); + you.set_stored_kcal( you.get_healthy_kcal() ); REQUIRE( you.get_mutations().empty() ); REQUIRE( you.height() == 175 ); - CHECK( ( you.get_base_volume() > 55_liter && you.get_base_volume() < 80_liter ) ); + REQUIRE( you.bodyweight() == 76562390_milligram ); + CHECK( you.get_base_volume() == 73485_ml ); REQUIRE( your_height_with_trait( trait_SMALL2 ) == 70 ); - CHECK( ( your_volume_with_trait( trait_SMALL2 ) > 20_liter && - your_volume_with_trait( trait_SMALL2 ) < 30_liter ) ); + CHECK( your_volume_with_trait( trait_SMALL2 ) == 23326_ml ); REQUIRE( your_height_with_trait( trait_SMALL ) == 122 ); - CHECK( ( your_volume_with_trait( trait_SMALL ) > 40_liter && - your_volume_with_trait( trait_SMALL ) < 50_liter ) ); + CHECK( your_volume_with_trait( trait_SMALL ) == 42476_ml ); REQUIRE( your_height_with_trait( trait_LARGE ) == 227 ); - CHECK( ( your_volume_with_trait( trait_LARGE ) > 100_liter && - your_volume_with_trait( trait_LARGE ) < 120_liter ) ); + CHECK( your_volume_with_trait( trait_LARGE ) == 116034_ml ); REQUIRE( your_height_with_trait( trait_HUGE ) == 280 ); - CHECK( ( your_volume_with_trait( trait_HUGE ) > 150_liter && - your_volume_with_trait( trait_HUGE ) < 200_liter ) ); + CHECK( your_volume_with_trait( trait_HUGE ) == 156228_ml ); } TEST_CASE( "character_at_volume_can_or_cannot_enter_vehicle", "[volume]" ) @@ -109,7 +108,7 @@ TEST_CASE( "character_at_volume_can_or_cannot_enter_vehicle", "[volume]" ) cramped = false; // Try the cramped aisle with a rock again, but now we are tiny, so it is easy. - CHECK( your_volume_with_trait( trait_SMALL2 ) < 30_liter ); + CHECK( your_volume_with_trait( trait_SMALL2 ) == 23326_ml ); you.setpos( test_pos ); // set our position again, clear_avatar() moved us dest_loc = dest_loc + tripoint_north; CHECK( you.can_move_to_vehicle_tile( dest_loc, cramped ) ); @@ -117,7 +116,7 @@ TEST_CASE( "character_at_volume_can_or_cannot_enter_vehicle", "[volume]" ) dest_loc = you.get_location(); //reset // Same aisle, but now we have HUGE GUTS. We will never fit. - CHECK( your_volume_with_trait( trait_HUGE ) > 150_liter ); + CHECK( your_volume_with_trait( trait_HUGE ) == 156228_ml ); you.setpos( test_pos ); // set our position again, clear_avatar() moved us dest_loc = dest_loc + tripoint_north; CHECK( !you.can_move_to_vehicle_tile( dest_loc ) );