Skip to content

Commit

Permalink
Improve some test failure messages from Lab 4 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keithw committed Oct 18, 2020
1 parent 5dfca2f commit f989eab
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/tcp_fsm_test_harness.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,12 @@ TCPSegment TCPTestHarness::expect_seg(const ExpectSegment &expectation, std::str
_steps_executed.emplace_back(expectation.to_string());
return ret;
} catch (const TCPExpectationViolation &e) {
cerr << "Test Failure on expectation:\n\t" << expectation.description() << "\nFailure message:\n\t" << e.what()
<< endl;
cerr << "Test Failure on expectation:\n\t" << expectation.description() << "\nFailure message:\n\t" << e.what();
cerr << "\n\nList of steps that executed successfully:";
for (const string &s : _steps_executed) {
cerr << "\n\t" << s;
}
cerr << endl << endl;
if (note.size() > 0) {
cerr << "Note:\n\t" << note << endl << endl;
}
Expand Down

0 comments on commit f989eab

Please sign in to comment.