Skip to content

Commit de7ae68

Browse files
committed
Remove the vehicle movement volume test
The test is obviously failing since the aisle's cargo size changed. This is something the test basically is intended to catch (to make sure that moving through an aisle is/isn't cramped) but it... no longer makes sense in the context of what we're doing. We turned off the inability to move through vehicle tiles based on size some time ago, and I don't see it coming back on anytime soon. Making it a test-specific object doesn't really help the test do what it's supposed to do. Marking it mayfail is not sufficient, it will continue to produce debugmsg and flag the github CI as failed. Therefore, my approach is to delete the test altogether.
1 parent 02e9324 commit de7ae68

File tree

1 file changed

+0
-63
lines changed

1 file changed

+0
-63
lines changed

tests/char_volume_test.cpp

Lines changed: 0 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,11 @@
1212
#include "units.h"
1313
#include "vpart_position.h"
1414

15-
static const itype_id itype_backpack_giant( "backpack_giant" );
16-
static const itype_id itype_rock_volume_test( "rock_volume_test" );
17-
1815
static const trait_id trait_HUGE( "HUGE" );
1916
static const trait_id trait_LARGE( "LARGE" );
2017
static const trait_id trait_SMALL( "SMALL" );
2118
static const trait_id trait_SMALL2( "SMALL2" );
2219

23-
static const vproto_id vehicle_prototype_character_volume_test_car( "character_volume_test_car" );
24-
2520
static units::volume your_volume_with_trait( trait_id new_trait )
2621
{
2722
clear_avatar();
@@ -60,61 +55,3 @@ TEST_CASE( "character_baseline_volumes", "[volume]" )
6055
REQUIRE( your_height_with_trait( trait_HUGE ) == 280 );
6156
CHECK( your_volume_with_trait( trait_HUGE ) == 156228_ml );
6257
}
63-
64-
TEST_CASE( "character_at_volume_will_be_cramped_in_vehicle", "[volume]" )
65-
{
66-
clear_avatar();
67-
clear_map();
68-
map &here = get_map();
69-
Character &you = get_player_character();
70-
REQUIRE( you.get_mutations().empty() );
71-
72-
tripoint_bub_ms test_pos {10, 10, 0 };
73-
74-
75-
clear_vehicles(); // extra safety
76-
here.add_vehicle( vehicle_prototype_character_volume_test_car, test_pos, 0_degrees, 0, 0 );
77-
you.setpos( here, test_pos );
78-
const optional_vpart_position vp_there = here.veh_at( you.pos_bub( here ) );
79-
REQUIRE( vp_there );
80-
tripoint_abs_ms dest_loc = you.pos_abs();
81-
82-
// Empty aisle
83-
dest_loc = dest_loc + tripoint::north_west;
84-
CHECK( !you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
85-
dest_loc = you.pos_abs(); //reset
86-
87-
// Aisle with 10L rock, a tight fit but not impossible
88-
dest_loc = dest_loc + tripoint::north;
89-
CHECK( you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
90-
dest_loc = you.pos_abs(); //reset
91-
92-
// Empty aisle, but we've put on a backpack and a 10L rock in that backpack
93-
item backpack( itype_backpack_giant );
94-
auto worn_success = you.wear_item( backpack );
95-
CHECK( worn_success );
96-
you.i_add( item( itype_rock_volume_test ) );
97-
CHECK( 75_liter <= you.get_total_volume() );
98-
CHECK( you.get_total_volume() <= 100_liter );
99-
dest_loc = dest_loc + tripoint::north_west;
100-
CHECK( you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
101-
dest_loc = you.pos_abs(); //reset
102-
103-
// Try the cramped aisle with a rock again, but now we are tiny, so it is easy.
104-
CHECK( your_volume_with_trait( trait_SMALL2 ) == 23326_ml );
105-
you.setpos( here, test_pos ); // set our position again, clear_avatar() moved us
106-
dest_loc = dest_loc + tripoint::north;
107-
CHECK( !you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
108-
dest_loc = you.pos_abs(); //reset
109-
110-
// Same aisle, but now we have HUGE GUTS. We will never fit.
111-
CHECK( your_volume_with_trait( trait_HUGE ) == 156228_ml );
112-
you.setpos( here, test_pos ); // set our position again, clear_avatar() moved us
113-
dest_loc = dest_loc + tripoint::north;
114-
CHECK( you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
115-
dest_loc = you.pos_abs(); //reset
116-
117-
// And finally, check that our HUGE body won't fit even into an empty aisle.
118-
dest_loc = dest_loc + tripoint::north_west;
119-
CHECK( you.will_be_cramped_in_vehicle_tile( here, dest_loc ) );
120-
}

0 commit comments

Comments
 (0)