about summary refs log tree commit diff stats
path: root/cpp/002trace
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-06 12:20:48 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-06 12:20:48 -0700
commit730b03bd75f67053eefee312650f383ad11555ee (patch)
tree8a8f559cc03137b0c89a0b302d4be34900209716 /cpp/002trace
parentc517316b09e35eee95cdae1b44f7c9357f9bddf6 (diff)
downloadmu-730b03bd75f67053eefee312650f383ad11555ee.tar.gz
1026
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