about summary refs log tree commit diff stats
path: root/cpp/013run
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/013run')
-rw-r--r--cpp/013run21
1 files changed, 6 insertions, 15 deletions
diff --git a/cpp/013run b/cpp/013run
index 1ccbb3b3..134df75a 100644
--- a/cpp/013run
+++ b/cpp/013run
@@ -108,28 +108,19 @@ void load(string filename) {
   fin.close();
 }
 
-//: helper for tests
+//: On startup, load everything in core.mu
+:(before "End Load Recipes")
+load("core.mu");
+recently_added_recipes.clear();  // Freeze everything so it doesn't get cleared by tests.
 
-:(before "End Globals")
-// track recipes added so that we can cleanup after each test
-vector<recipe_number> recipes_added_by_test;
+//: helper for tests
 
 :(code)
 void run(string form) {
   vector<recipe_number> tmp = add_recipes(form);
-  recipes_added_by_test.insert(recipes_added_by_test.end(), tmp.begin(), tmp.end());
   transform_all();
-  run(recipes_added_by_test.front());
-}
-
-:(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'; //? 2
-  Recipe_number.erase(Recipe[recipes_added_by_test[i]].name);
-  Recipe.erase(recipes_added_by_test[i]);
+  run(tmp.front());
 }
-// Clear state for recipes_added_by_test
-recipes_added_by_test.clear();
 
 :(code)
 vector<int> read_memory(reagent x) {