diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-05-05 21:17:24 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-05-05 21:17:24 -0700 |
commit | b96af395b9af2ff9df94b3e82213171f30827c8d (patch) | |
tree | 17c8c12648ccc25625e2534ec8d74fbe8f1542cc /051scenario_test.mu | |
parent | 2e3b597fe85b654e82b891c22d50754fa5a26156 (diff) | |
download | mu-b96af395b9af2ff9df94b3e82213171f30827c8d.tar.gz |
1276 - make C++ version the default
I've tried to update the Readme, but there are at least a couple of issues.
Diffstat (limited to '051scenario_test.mu')
-rw-r--r-- | 051scenario_test.mu | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/051scenario_test.mu b/051scenario_test.mu new file mode 100644 index 00000000..5064f8a5 --- /dev/null +++ b/051scenario_test.mu @@ -0,0 +1,70 @@ +# tests for 'scenario' in previous layer + +scenario first_scenario_in_mu [ + run [ + 1:integer <- add 2:literal, 2:literal + ] + memory-should-contain [ + 1 <- 4 + ] +] + +scenario scenario_with_comment_in_mu [ + run [ + # comment + 1:integer <- add 2:literal, 2:literal + ] + memory-should-contain [ + 1 <- 4 + ] +] + +scenario scenario_with_multiple_comments_in_mu [ + run [ + # comment1 + # comment2 + 1:integer <- add 2:literal, 2:literal + ] + memory-should-contain [ + 1 <- 4 + ] +] + +scenario check_string_in_memory [ + run [ + 1:integer <- copy 3:literal + 2:character <- copy 97:literal # 'a' + 3:character <- copy 98:literal # 'b' + 4:character <- copy 99:literal # 'c' + ] + memory-should-contain [ + 1:string <- [abc] + ] +] + +scenario check_trace [ + run [ + 1:integer <- add 2:literal, 2:literal + ] + trace-should-contain [ + mem: storing 4 in location 1 + ] +] + +scenario check_trace_negative [ + run [ + 1:integer <- add 2:literal, 2:literal + ] + trace-should-not-contain [ + mem: storing 5 in location 1 + ] +] + +scenario check_trace_instruction [ + run [ + trace [foo], [aaa] + ] + trace-should-contain [ + foo: aaa + ] +] |