From 62a52ffbfe2880fe754732ca3417eab96ff83738 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 1 Jul 2015 10:19:04 -0700 Subject: 1690 --- html/050scenario.cc.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'html/050scenario.cc.html') diff --git a/html/050scenario.cc.html b/html/050scenario.cc.html index 43054dff..d49f477e 100644 --- a/html/050scenario.cc.html +++ b/html/050scenario.cc.html @@ -168,16 +168,17 @@ const scenario* Current_scenario = NULL(const scenario& s) { Current_scenario = &s; bool not_already_inside_test = !Trace_stream; -//? cerr << s.name << '\n'; //? 4 +//? cerr << s.name << '\n'; //? 6 if (not_already_inside_test) { Trace_file = s.name; Trace_stream = new trace_stream; setup(); } -//? cerr << '^' << s.to_run << "$\n"; //? 4 assert(Routines.empty()); - run("recipe "+s.name+" [ " + s.to_run + " ]"); -//? cerr << s.name << " done\n"; //? 1 + vector<recipe_number> tmp = load("recipe "+s.name+" [ "+s.to_run+" ]"); + bind_special_scenario_names(tmp.at(0)); + transform_all(); + run(tmp.front()); if (not_already_inside_test && Trace_stream) { teardown(); ofstream fout((Trace_dir+Trace_file).c_str()); @@ -216,14 +217,21 @@ case RUN: { tmp << "recipe run" << Next_recipe_number << " [ " << current_instruction().ingredients.at(0).name << " ]"; //? Show_rest_of_stream = true; //? 1 vector<recipe_number> tmp_recipe = load(tmp.str()); - // Predefined Scenario Locals In Run. - // End Predefined Scenario Locals In Run. + bind_special_scenario_names(tmp_recipe.at(0)); transform_all(); //? cout << tmp_recipe.at(0) << ' ' << Recipe_number["main"] << '\n'; //? 1 Current_routine->calls.push_front(call(tmp_recipe.at(0))); continue; // not done with caller; don't increment current_step_index() } +// Some variables for fake resources always get special addresses in +// scenarios. +:(code) +void bind_special_scenario_names(recipe_number r) { + // Special Scenario Variable Names(r) + // End Special Scenario Variable Names(r) +} + :(scenario run_multiple) recipe main [ run [ @@ -486,6 +494,7 @@ recipe main [ ] ] -warn: missing [b] in trace layer a +$warn: 0 //: 'trace-should-not-contain' is like the '-' lines in our scenarios so far //: Each trace line is separately checked for absense. Order is *not* @@ -538,6 +547,7 @@ recipe main [ ] ] -warn: unexpected [b] in trace layer a +$warn: 0 :(scenario trace_negative_check_warns_on_any_unexpected_line) % Hide_warnings = true; -- cgit 1.4.1-2-gfad0