about summary refs log tree commit diff stats
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/010vm2
-rw-r--r--cpp/013run4
-rw-r--r--cpp/025name2
3 files changed, 6 insertions, 2 deletions
diff --git a/cpp/010vm b/cpp/010vm
index 931ae673..5d3ddd53 100644
--- a/cpp/010vm
+++ b/cpp/010vm
@@ -141,6 +141,8 @@ void setup_recipes() {
   load("core.mu");
   assert(Next_recipe_number < 100);
   Next_recipe_number = 100;
+  recipes_added_by_test.clear();  // Freeze everything added so far.
+  delete Trace_stream;  Trace_stream = new trace_stream;
 :(before "End Setup")
   Next_recipe_number = 100;  // consistent new numbers for each test
 
diff --git a/cpp/013run b/cpp/013run
index e226bc01..1ccbb3b3 100644
--- a/cpp/013run
+++ b/cpp/013run
@@ -104,6 +104,7 @@ void load(string filename) {
   }
   fin >> std::noskipws;
   add_recipes(fin);
+  transform_all();
   fin.close();
 }
 
@@ -123,10 +124,11 @@ void run(string form) {
 
 :(before "End Setup")
 for (size_t i = 0; i < recipes_added_by_test.size(); ++i) {
-//?   cout << "AAA clearing " << Recipe[recipes_added_by_test[i]].name << '\n'; //? 1
+//?   cout << "AAA clearing " << Recipe[recipes_added_by_test[i]].name << '\n'; //? 2
   Recipe_number.erase(Recipe[recipes_added_by_test[i]].name);
   Recipe.erase(recipes_added_by_test[i]);
 }
+// Clear state for recipes_added_by_test
 recipes_added_by_test.clear();
 
 :(code)
diff --git a/cpp/025name b/cpp/025name
index 6f61234d..0c36d5ca 100644
--- a/cpp/025name
+++ b/cpp/025name
@@ -25,7 +25,7 @@ Transform.push_back(transform_names);
 unordered_map<recipe_number, unordered_map<string, int> > Name;
 :(before "End One-time Setup")
 Name.clear();
-:(before "recipes_added_by_test.clear()")
+:(before "Clear state for recipes_added_by_test")
 for (size_t i = 0; i < recipes_added_by_test.size(); ++i) {
   Name.erase(recipes_added_by_test[i]);
 }