about summary refs log tree commit diff stats
path: root/cpp/010vm
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-08 00:13:11 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-08 00:15:26 -0700
commit26785f2a7c2937765f1c0c9e26ce6b80aa4f8dfe (patch)
tree86bf3ba3ef9c54f664515aa008d6bc32e96449bc /cpp/010vm
parent9ea7648336251d440a9cd8d91112254e8b38268c (diff)
downloadmu-26785f2a7c2937765f1c0c9e26ce6b80aa4f8dfe.tar.gz
1031 - stop clearing recipes after every test
I think the string-equal scenarios are failing to fail. But we'll fix
them once we wrap up test isolation.
Diffstat (limited to 'cpp/010vm')
-rw-r--r--cpp/010vm10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpp/010vm b/cpp/010vm
index 82544193..7116b555 100644
--- a/cpp/010vm
+++ b/cpp/010vm
@@ -132,11 +132,17 @@ void setup_recipes() {
   assert(Next_recipe_number == COPY);
   Next_recipe_number++;
   // End Primitive Recipe Numbers.
+}
+//: We could just reset the recipe table after every test, but that gets slow
+//: all too quickly. Instead, initialize the common stuff just once at
+//: startup, and carefully undo each test's additions after itself.
+:(before "End One-time Setup")
+  setup_recipes();
+  load("core.mu");
   assert(Next_recipe_number < 100);
   Next_recipe_number = 100;
-}
 :(before "End Setup")
-  setup_recipes();
+  Next_recipe_number = 100;  // consistent new numbers for each test