From 5a5beebd15f5c4327a55bd3ccae75807cdeb50b8 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 15 Jan 2016 01:44:35 +0100 Subject: [PATCH] marcro to indicate current test function on STDOUT since our test.sh runner can be used to verify the expected output printed by tests, working with these output transcripts of larger tests can be hard at times. These separators help to find who produced which output and they prevent a regexp match to grep beyond the feed of a single function (which can be a common problem when using the self-diagnostic output of the facility currently in test, which obviously will be similar on any data printed. --- src/lib/test/test-helper.hpp | 8 ++++++++ tests/gui/abstract-tangible-test.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/test/test-helper.hpp b/src/lib/test/test-helper.hpp index 953f96dc6..631ad2ba9 100644 --- a/src/lib/test/test-helper.hpp +++ b/src/lib/test/test-helper.hpp @@ -175,4 +175,12 @@ namespace test{ CHECK (lumiera_error_expect (LUMIERA_ERROR_##ERROR_ID));\ } + +/** + * Macro to mark the current test function in STDOUT. + * This can be helpful to digest a long test output dump + */ +#define MARK_TEST_FUN \ + cout << "|" << endl << "| »"<<__FUNCTION__<<"«" <