Skip to content

Commit

Permalink
Fix npc_talk test that failed in isolation
Browse files Browse the repository at this point in the history
After splitting up the npc_talk_test tests, one of them would fail if
run in isolation due to inter-test dependency.

Fix that.

At the same time, split the tests up some more.
  • Loading branch information
jbytheway authored and kevingranade committed Aug 3, 2019
1 parent 141974c commit 5e13831
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/npc_talk_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,15 @@ TEST_CASE( "npc_talk_bionics", "[npc_talk]" )
CHECK( d.responses[0].text == "This is a basic test response." );
CHECK( d.responses[1].text == "This is a u_has_bionics bio_ads test response." );
CHECK( d.responses[2].text == "This is a npc_has_bionics ANY response." );
}

TEST_CASE( "npc_talk_effects", "[npc_talk]" )
{
dialogue d;
npc &talker_npc = prep_test( d );

// speaker effects just use are owed because I don't want to do anything complicated
g->u.cash = 1000;
talker_npc.op_of_u.owed = 2000;
CHECK( talker_npc.op_of_u.owed == 2000 );
d.add_topic( "TALK_TEST_SPEAKER_EFFECT_SIMPLE" );
Expand Down

0 comments on commit 5e13831

Please sign in to comment.