Skip to content

Commit

Permalink
Ensure consistent spoilage estimate in test
Browse files Browse the repository at this point in the history
item.cpp#L934 `get_freshness_description` gives more detailed rot
estimation messages to more skilled characters. Travis-CI revealed this
test failing sometimes; this commit should ensure a consistent (0) skill
level when testing these messages.
  • Loading branch information
wapcaplet committed Feb 12, 2020
1 parent 297076f commit c80a0b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/iteminfo_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ TEST_CASE( "food freshness and lifetime", "[item][iteminfo]" )
{
iteminfo_query q( { iteminfo_parts::FOOD_ROT } );

// Ensure test character has no skill estimating spoilage
g->u.empty_skills();
REQUIRE_FALSE( g->u.can_estimate_rot() );

SECTION( "food is fresh" ) {
iteminfo_test(
item( "pine_nuts" ), q,
Expand Down

0 comments on commit c80a0b5

Please sign in to comment.