From d009e158803956c76adbf8f58a62884c3e7affb3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 26 Jan 2016 23:47:23 -0800 Subject: 2605 --- html/003trace.cc.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'html/003trace.cc.html') diff --git a/html/003trace.cc.html b/html/003trace.cc.html index a1c0be03..c19044fb 100644 --- a/html/003trace.cc.html +++ b/html/003trace.cc.html @@ -287,7 +287,7 @@ int trace_count(string label0; for (vector<trace_line>::iterator p = Trace_stream->past_lines.begin(); p != Trace_stream->past_lines.end(); ++p) { if (label == p->label) { - if (line == "" || line == trim(p->contents)) + if (line == "" || trim(line) == trim(p->contents)) ++result; } } @@ -304,6 +304,16 @@ int trace_count(string label return; \ } +#define CHECK_TRACE_COUNT(label, count) \ + if (trace_count(label) != (count)) { \ + ++Num_failures; \ + cerr << "\nF - " << __FUNCTION__ << "(" << __FILE__ << ":" << __LINE__ << "): trace_count of " << label << " should be " << count << '\n'; \ + cerr << " got " << trace_count(label) << '\n'; /* multiple eval */ \ + DUMP(label); \ + Passed = false; \ + return; /* Currently we stop at the very first failure. */ \ + } + bool trace_doesnt_contain(string label, string line) { return trace_count(label, line) == 0; } -- cgit 1.4.1-2-gfad0