about summary refs log tree commit diff stats
path: root/003trace.test.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-12-24 15:36:12 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-12-24 15:36:12 -0800
commite94453100dda87a42dee36b2671f850ab6824f54 (patch)
tree38f0b8c39ea1ee2f8ec16536d07430c29cb07a45 /003trace.test.cc
parent7874586ebdbe4d57dff167d80f9f6d59056d3c73 (diff)
downloadmu-e94453100dda87a42dee36b2671f850ab6824f54.tar.gz
2547
Diffstat (limited to '003trace.test.cc')
-rw-r--r--003trace.test.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/003trace.test.cc b/003trace.test.cc
index f34cbf88..31c35e2d 100644
--- a/003trace.test.cc
+++ b/003trace.test.cc
@@ -10,6 +10,12 @@ void test_trace_check_ignores_other_layers() {
   CHECK_TRACE_DOESNT_CONTAIN("test layer 2: foo");
 }
 
+void test_trace_check_ignores_leading_whitespace() {
+  trace("test layer 1") << " foo" << end();
+  CHECK(trace_count("test layer 1", /*too little whitespace*/"foo") == 1);
+  CHECK(trace_count("test layer 1", /*too much whitespace*/"  foo") == 1);
+}
+
 void test_trace_check_ignores_other_lines() {
   trace("test layer 1") << "foo" << end();
   trace("test layer 1") << "bar" << end();