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 2024/01/10 00:43:49 UTC

(logging-log4cxx) branch master updated: Ensure the test name preceeds its output (#328)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 7ae2e640 Ensure the test name preceeds its output (#328)
7ae2e640 is described below

commit 7ae2e640f933ced35f8c3839692b170c17b00927
Author: Stephen Webb <st...@ieee.org>
AuthorDate: Wed Jan 10 11:43:43 2024 +1100

    Ensure the test name preceeds its output (#328)
---
 src/test/cpp/abts.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/test/cpp/abts.cpp b/src/test/cpp/abts.cpp
index 46623241..3aaa5134 100644
--- a/src/test/cpp/abts.cpp
+++ b/src/test/cpp/abts.cpp
@@ -210,7 +210,10 @@ void abts_run_test(abts_suite* ts, const char* name, test_func f, void* value)
 	update_status();
 
 	if (verbose)
+	{
 		fprintf(stdout, "  %s\n", name);
+		fflush(stdout);
+	}
 	f(&tc, value);
 
 	if (tc.failed)
@@ -246,15 +249,15 @@ static int report(abts_suite* suite)
 	}
 
 	dptr = suite->head;
-	fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests");
-	fprintf(stdout, "===================================================\n");
+	fprintf(stdout, "%-35s\t\tTotal\tFail\tFailed %%\n", "Failed Tests");
+	fprintf(stdout, "=======================================================================\n");
 
 	while (dptr != NULL)
 	{
 		if (dptr->failed.size() != 0)
 		{
 			float percent = ((float)dptr->failed.size() / (float)dptr->num_test);
-			fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name.c_str(),
+			fprintf(stdout, "%-35s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name.c_str(),
 				dptr->num_test, (int)dptr->failed.size(), percent * 100);
 			for( const char* failed_name : dptr->failed ){
 				fprintf(stdout, "  %s\n", failed_name );