about summary refs log tree commit diff stats
path: root/060rewrite_literal_string.cc
diff options
context:
space:
mode:
Diffstat (limited to '060rewrite_literal_string.cc')
-rw-r--r--060rewrite_literal_string.cc25
1 files changed, 15 insertions, 10 deletions
diff --git a/060rewrite_literal_string.cc b/060rewrite_literal_string.cc
index 7bfc45cb..3e64fd7c 100644
--- a/060rewrite_literal_string.cc
+++ b/060rewrite_literal_string.cc
@@ -1,15 +1,20 @@
 //: allow using literal strings anywhere that will accept immutable strings
 
-:(scenario passing_literals_to_recipes)
-def main [
-  1:num/raw <- foo [abc]
-]
-def foo x:text -> n:num [
-  local-scope
-  load-ingredients
-  n <- length *x
-]
-+mem: storing 3 in location 1
+void test_passing_literals_to_recipes() {
+  run(
+      "def main [\n"
+      "  1:num/raw <- foo [abc]\n"
+      "]\n"
+      "def foo x:text -> n:num [\n"
+      "  local-scope\n"
+      "  load-ingredients\n"
+      "  n <- length *x\n"
+      "]\n"
+  );
+  CHECK_TRACE_CONTENTS(
+      "mem: storing 3 in location 1\n"
+  );
+}
 
 :(before "End Instruction Inserting/Deleting Transforms")
 initialize_transform_rewrite_literal_string_to_text();