Skip to content

Commit

Permalink
Make checks for volume less dependent on exact volumes
Browse files Browse the repository at this point in the history
Make tests more flexible
  • Loading branch information
feinorgh committed Jun 11, 2024
1 parent e1a257b commit 5e8eb72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/char_volume_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ 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 ) == 23326_ml );
CHECK( your_volume_with_trait( trait_SMALL2 ) < 30_liter );
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 ) );
CHECK( !cramped );
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 ) == 156228_ml );
CHECK( your_volume_with_trait( trait_HUGE ) > 150_liter );
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 ) );
Expand Down

0 comments on commit 5e8eb72

Please sign in to comment.