From d990e8f07aee36f68bcd270889d20c2d22b9aa0b Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Wed, 17 Aug 2016 19:04:35 -0700 Subject: 3219 Trying keeping html in the master branch: https://github.com/blog/2228-simpler-github-pages-publishing Let's see if https://akkartik.github.io/mu updates after I push this commit to just the master branch. --- html/003trace.cc.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'html/003trace.cc.html') diff --git a/html/003trace.cc.html b/html/003trace.cc.html index 13cba511..33c54ba1 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -309,6 +309,18 @@ START_TRACING_UNTIL_END_OF_SCOPE return result; } +int trace_count_prefix(string label, string prefix) { + if (!Trace_stream) return 0; + long result = 0; + for (vector<trace_line>::iterator p = Trace_stream->past_lines.begin(); p != Trace_stream->past_lines.end(); ++p) { + if (label == p->label) { + if (starts_with(trim(p->contents), trim(prefix))) + ++result; + } + } + return result; +} + #define CHECK_TRACE_CONTAINS_ERROR() CHECK(trace_count("error") > 0) #define CHECK_TRACE_DOESNT_CONTAIN_ERROR() \ if (trace_count("error") > 0) { \ -- cgit 1.4.1-2-gfad0