about summary refs log tree commit diff stats
path: root/042name.cc
diff options
context:
space:
mode:
Diffstat (limited to '042name.cc')
-rw-r--r--042name.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/042name.cc b/042name.cc
index 46e3a816..872b5678 100644
--- a/042name.cc
+++ b/042name.cc
@@ -23,10 +23,15 @@ Transform.push_back(transform_names);  // idempotent
 
 :(before "End Globals")
 map<recipe_ordinal, map<string, int> > Name;
-:(after "Clear Other State For Recently_added_recipes")
-for (int i = 0; i < SIZE(Recently_added_recipes); ++i) {
-  Name.erase(Recently_added_recipes.at(i));
-}
+
+//: the Name map is a global, so save it before tests and reset it for every
+//: test, just to be safe.
+:(before "End Globals")
+map<recipe_ordinal, map<string, int> > Name_snapshot;
+:(before "End save_snapshots")
+Name_snapshot = Name;
+:(before "End restore_snapshots")
+Name = Name_snapshot;
 
 :(code)
 void transform_names(const recipe_ordinal r) {