diff options
Diffstat (limited to 'cpp/050scenario')
-rw-r--r-- | cpp/050scenario | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/050scenario b/cpp/050scenario index c51afa59..8dd734c5 100644 --- a/cpp/050scenario +++ b/cpp/050scenario @@ -3,6 +3,7 @@ :(before "End Types") struct scenario { string name; + string dump_layer; string to_run; map<int, int> memory_expectations; // End scenario Fields @@ -18,10 +19,8 @@ for (size_t i = 0; i < Scenarios.size(); ++i) { setup(); Trace_file = Scenarios[i].name; START_TRACING_UNTIL_END_OF_SCOPE -//? Trace_stream->dump_layer = "all"; //? 2 -//? cout << "before: " << Memory[1] << '\n'; //? 1 -//? Trace_stream->dump_layer = "all"; //? 1 -//? cout << "Before:\n"; dump_memory(); //? 1 + if (!Scenarios[i].dump_layer.empty()) + Trace_stream->dump_layer = Scenarios[i].dump_layer; //? cout << Scenarios[i].to_run; //? 2 run(Scenarios[i].to_run); //? cout << "after: " << Memory[1] << '\n'; //? 1 @@ -67,6 +66,10 @@ scenario parse_scenario(istream& in) { else if (scenario_command == "memory") { handle_scenario_memory_directive(inner, x); } + else if (scenario_command == "dump") { + skip_whitespace_and_comments(inner); + x.dump_layer = next_word(inner); + } // End Scenario Command Handlers else { raise << "unknown command in scenario: ^" << scenario_command << "$\n"; |