diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 17:30:14 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-01 17:30:14 -0700 |
commit | 166e3c0d407a967d25d793b6a9db56ffd7a03727 (patch) | |
tree | 73b18adca78fda2a4b1ef5a65fe3851e77248d93 /050scenario.cc | |
parent | 16386f766ec1e347db8a19ebfd9cedaa9b281a5f (diff) | |
download | mu-166e3c0d407a967d25d793b6a9db56ffd7a03727.tar.gz |
2232
Diffstat (limited to '050scenario.cc')
-rw-r--r-- | 050scenario.cc | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/050scenario.cc b/050scenario.cc index 65e161b3..5f92fec8 100644 --- a/050scenario.cc +++ b/050scenario.cc @@ -189,6 +189,10 @@ recipe main [ RUN, :(before "End Primitive Recipe Numbers") Recipe_ordinal["run"] = RUN; +:(before "End Primitive Recipe Checks") +case RUN: { + break; +} :(before "End Primitive Recipe Implementations") case RUN: { ostringstream tmp; @@ -243,6 +247,10 @@ recipe main [ MEMORY_SHOULD_CONTAIN, :(before "End Primitive Recipe Numbers") Recipe_ordinal["memory-should-contain"] = MEMORY_SHOULD_CONTAIN; +:(before "End Primitive Recipe Checks") +case MEMORY_SHOULD_CONTAIN: { + break; +} :(before "End Primitive Recipe Implementations") case MEMORY_SHOULD_CONTAIN: { if (!Passed) break; @@ -404,6 +412,10 @@ recipe main [ TRACE_SHOULD_CONTAIN, :(before "End Primitive Recipe Numbers") Recipe_ordinal["trace-should-contain"] = TRACE_SHOULD_CONTAIN; +:(before "End Primitive Recipe Checks") +case TRACE_SHOULD_CONTAIN: { + break; +} :(before "End Primitive Recipe Implementations") case TRACE_SHOULD_CONTAIN: { if (!Passed) break; @@ -496,6 +508,10 @@ recipe main [ TRACE_SHOULD_NOT_CONTAIN, :(before "End Primitive Recipe Numbers") Recipe_ordinal["trace-should-not-contain"] = TRACE_SHOULD_NOT_CONTAIN; +:(before "End Primitive Recipe Checks") +case TRACE_SHOULD_NOT_CONTAIN: { + break; +} :(before "End Primitive Recipe Implementations") case TRACE_SHOULD_NOT_CONTAIN: { if (!Passed) break; @@ -556,22 +572,26 @@ recipe main [ CHECK_TRACE_COUNT_FOR_LABEL, :(before "End Primitive Recipe Numbers") Recipe_ordinal["check-trace-count-for-label"] = CHECK_TRACE_COUNT_FOR_LABEL; -:(before "End Primitive Recipe Implementations") +:(before "End Primitive Recipe Checks") case CHECK_TRACE_COUNT_FOR_LABEL: { - if (!Passed) break; - if (SIZE(current_instruction().ingredients) != 2) { - raise << maybe(current_recipe_name()) << "'check-trace-for-label' requires exactly two ingredients, but got '" << current_instruction().to_string() << "'\n" << end(); + if (SIZE(inst.ingredients) != 2) { + raise << maybe(Recipe[r].name) << "'check-trace-for-label' requires exactly two ingredients, but got '" << inst.to_string() << "'\n" << end(); break; } - if (!scalar(ingredients.at(0))) { - raise << maybe(current_recipe_name()) << "first ingredient of 'check-trace-for-label' should be a number (count), but got " << current_instruction().ingredients.at(0).original_string << '\n' << end(); + if (!is_mu_scalar(inst.ingredients.at(0))) { + raise << maybe(Recipe[r].name) << "first ingredient of 'check-trace-for-label' should be a number (count), but got " << inst.ingredients.at(0).original_string << '\n' << end(); break; } - long long int expected_count = ingredients.at(0).at(0); - if (!is_literal_string(current_instruction().ingredients.at(1))) { - raise << maybe(current_recipe_name()) << "second ingredient of 'check-trace-for-label' should be a literal string (label), but got " << current_instruction().ingredients.at(1).original_string << '\n' << end(); + if (!is_literal_string(inst.ingredients.at(1))) { + raise << maybe(Recipe[r].name) << "second ingredient of 'check-trace-for-label' should be a literal string (label), but got " << inst.ingredients.at(1).original_string << '\n' << end(); break; } + break; +} +:(before "End Primitive Recipe Implementations") +case CHECK_TRACE_COUNT_FOR_LABEL: { + if (!Passed) break; + long long int expected_count = ingredients.at(0).at(0); string label = current_instruction().ingredients.at(1).name; long long int count = trace_count(label); if (count != expected_count) { |