Skip to content

Commit

Permalink
Fix clang warnings
Browse files Browse the repository at this point in the history
(sting id naming)
(string id *sorting*)
(test names don't include special chars)
  • Loading branch information
RenechCDDA committed Dec 14, 2024
1 parent a602354 commit 5caefb3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/npc_behavior_rules_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ static const update_mapgen_id
update_mapgen_debug_npc_rules_test_close_doors( "debug_npc_rules_test_close_doors" );

static const furn_str_id furn_f_chair( "f_chair" );

Check failure on line 48 in tests/npc_behavior_rules_test.cpp

View workflow job for this annotation

GitHub Actions / build (other)

string_id declarations should be sorted. [cata-static-string_id-constants,-warnings-as-errors]

static const ter_str_id ter_t_door_c( "t_door_c" );
static const ter_str_id ter_t_door_locked( "t_door_locked" );
static const ter_str_id ter_t_door_o( "t_door_o" );

static const vproto_id veh_locked_as_hell_car( "locked_as_hell_car" );
static const vproto_id vehicle_prototype_locked_as_hell_car( "locked_as_hell_car" );

static shared_ptr_fast<npc> setup_generic_rules_test( ally_rule rule_to_test,
update_mapgen_id update_mapgen_id_to_apply )
Expand All @@ -76,7 +77,7 @@ static shared_ptr_fast<npc> setup_generic_rules_test( ally_rule rule_to_test,
return guy;
}

TEST_CASE( "NPC rules (avoid doors)", "[npc_rules]" )
TEST_CASE( "NPC-rules-avoid-doors", "[npc_rules]" )
{
/* Avoid doors rule
* Allows: Door frame, Open doors(??? pre-existing behavior)
Expand Down Expand Up @@ -112,7 +113,7 @@ TEST_CASE( "NPC rules (avoid doors)", "[npc_rules]" )
}
}

TEST_CASE( "NPC rules (close doors)", "[npc_rules]" )
TEST_CASE( "NPC-rules-close-doors", "[npc_rules]" )
{
/* Close doors rule
* Target is a chair in a room fully enclosed by concrete walls
Expand Down Expand Up @@ -176,7 +177,7 @@ TEST_CASE( "NPC rules (close doors)", "[npc_rules]" )

}

TEST_CASE( "NPC rules (avoid locks)", "[npc_rules]" )
TEST_CASE( "NPC-rules-avoid-locks", "[npc_rules]" )
{
/* Avoid locked doors rule
* Target is a the north side of a locked door (otherwise inaccessible room)
Expand Down Expand Up @@ -225,7 +226,7 @@ TEST_CASE( "NPC rules (avoid locks)", "[npc_rules]" )


// all sides of the vehicle are locked doors
vehicle *test_vehicle = here.add_vehicle( veh_locked_as_hell_car,
vehicle *test_vehicle = here.add_vehicle( vehicle_prototype_locked_as_hell_car,
car_center_pos, 0_degrees, 0, 0 );

// vehicle is a 5x5 grid, car_door_pos is the only door/exit
Expand Down

0 comments on commit 5caefb3

Please sign in to comment.