From 5b61fd3fbaf41031232296abde56258d12ba3340 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Tue, 12 Sep 2017 15:51:33 +0100 Subject: COMPMID-417: Fix validation Change-Id: I7a745037136bc6e02d177f65fe4f4cd43873b98e Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87406 Tested-by: Kaizen Reviewed-by: Anthony Barbier --- tests/framework/printers/PrettyPrinter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/framework/printers/PrettyPrinter.cpp') diff --git a/tests/framework/printers/PrettyPrinter.cpp b/tests/framework/printers/PrettyPrinter.cpp index 2f7df1837a..5eec72a2fe 100644 --- a/tests/framework/printers/PrettyPrinter.cpp +++ b/tests/framework/printers/PrettyPrinter.cpp @@ -102,9 +102,10 @@ void PrettyPrinter::print_info(const std::string &info) *_stream << begin_color("1") << "INFO: " << info << end_color() << "\n"; } -void PrettyPrinter::print_error(const std::exception &error) +void PrettyPrinter::print_error(const std::exception &error, bool expected) { - *_stream << begin_color("1") << "ERROR: " << error.what() << end_color() << "\n"; + std::string prefix = expected ? "EXPECTED ERROR: " : "ERROR: "; + *_stream << begin_color("1") << prefix << error.what() << end_color() << "\n"; } void PrettyPrinter::print_measurements(const Profiler::MeasurementsMap &measurements) -- cgit v1.2.1