You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by sw...@apache.org on 2023/04/15 07:49:55 UTC

[logging-log4cxx] branch unit_test_output created (now c876caf6)

This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a change to branch unit_test_output
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git


      at c876caf6 Include test function name in verbose mode (-v) unit test output

This branch includes the following new commits:

     new c876caf6 Include test function name in verbose mode (-v) unit test output

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[logging-log4cxx] 01/01: Include test function name in verbose mode (-v) unit test output

Posted by sw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

swebb2066 pushed a commit to branch unit_test_output
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git

commit c876caf67e80136e742ea683e24972ed86a1f8a3
Author: Stephen Webb <sw...@gmail.com>
AuthorDate: Sat Apr 15 17:45:02 2023 +1000

    Include test function name in verbose mode (-v) unit test output
---
 src/test/cpp/abts.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/test/cpp/abts.cpp b/src/test/cpp/abts.cpp
index 403e5c73..46623241 100644
--- a/src/test/cpp/abts.cpp
+++ b/src/test/cpp/abts.cpp
@@ -184,7 +184,7 @@ abts_suite* abts_add_suite(abts_suite* suite, const char* suite_name_full)
 	}
 
 	reset_status();
-	fprintf(stdout, "%-20s:  ", subsuite->name.c_str());
+	fprintf(stdout, (verbose ? "%s:\n" :"%-20s:  "), subsuite->name.c_str());
 	update_status();
 	fflush(stdout);
 
@@ -209,6 +209,8 @@ void abts_run_test(abts_suite* ts, const char* name, test_func f, void* value)
 	ss->num_test++;
 	update_status();
 
+	if (verbose)
+		fprintf(stdout, "  %s\n", name);
 	f(&tc, value);
 
 	if (tc.failed)