about summary refs log tree commit diff stats
path: root/cpp/002trace
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/002trace')
-rw-r--r--cpp/002trace3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpp/002trace b/cpp/002trace
index 4946517c..c01de39e 100644
--- a/cpp/002trace
+++ b/cpp/002trace
@@ -200,6 +200,9 @@ struct lease_tracer {
   }
 };
 
+// To transparently save traces, start tests with the TEST() macro.
+#define TEST(name) void test_##name() { Trace_file = #name;
+
 #define START_TRACING_UNTIL_END_OF_SCOPE  lease_tracer leased_tracer;
 :(before "End Test Setup")
   START_TRACING_UNTIL_END_OF_SCOPE