about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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]);
 }
d56fadd'>^
b514fbb9 ^

e877e1fc ^
a675eda3 ^
e877e1fc ^
fd5e720b ^



e877e1fc ^

b514fbb9 ^


70763af3 ^








6845c4d9 ^
70763af3 ^




b514fbb9 ^
f6b44306 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48