From 0edc9471c773ab0ce0ae0abcffacf41e1440742d Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 12 Apr 2015 22:42:07 -0700 Subject: 1055 --- cpp/031scenario | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'cpp/031scenario') diff --git a/cpp/031scenario b/cpp/031scenario index 8a3ced47..f3bd582c 100644 --- a/cpp/031scenario +++ b/cpp/031scenario @@ -62,7 +62,7 @@ scenario parse_scenario(istream& in) { } // End Scenario Command Handlers else { - raise << "unknown command in scenario: ^" << scenario_command << "$"; + raise << "unknown command in scenario: ^" << scenario_command << "$\n"; } } return x; @@ -77,15 +77,12 @@ void handle_scenario_run_directive(istream& in, scenario& result) { void handle_scenario_memory_directive(istream& in, scenario& out) { if (next_word(in) != "should") { - raise << "'memory' directive inside scenario must continue 'memory should'"; + raise << "'memory' directive inside scenario must continue 'memory should'\n"; } if (next_word(in) != "contain") { - raise << "'memory' directive inside scenario must continue 'memory should contain'"; - } - skip_whitespace_and_comments(in); - if (in.get() != '[') { - raise << "'memory' directive inside scenario must begin with 'memory should contain ['"; + raise << "'memory' directive inside scenario must continue 'memory should contain'\n"; } + skip_bracket(in, "'memory' directive inside scenario must begin with 'memory should contain ['\n"); while (true) { skip_whitespace_and_comments(in); if (in.eof()) break; @@ -120,7 +117,7 @@ void slurp_until_matching_bracket(istream& in, ostream& out) { void skip_bracket(istream& in, string message) { skip_whitespace(in); skip_comments_and_newlines(in); skip_whitespace(in); if (in.get() != '[') - raise << message; + raise << message << '\n'; } void skip_whitespace_and_comments(istream& in) { -- cgit 1.4.1-2-gfad0