From b4589f11faa8344b36e4ec871fb578bea7f1e48e Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 4 Sep 2012 23:24:22 +0200 Subject: [PATCH] Restore original test output format. --- src/test/GTestSuite.cpp | 17 ++--------------- src/test/GTestSuites.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/test/GTestSuite.cpp b/src/test/GTestSuite.cpp index 02b391f..194390d 100644 --- a/src/test/GTestSuite.cpp +++ b/src/test/GTestSuite.cpp @@ -264,14 +264,10 @@ bool GTestSuite::run(void) // Log name of test suite m_log << std::endl; - //m_log.header3(this->name()); // Initialise success flag bool success = true; - // Initialise test suite counter - int num_suites = 0; - // Loop over all functions in suite for (m_index = 0; m_index < m_functions.size(); ++m_index) { @@ -284,12 +280,6 @@ bool GTestSuite::run(void) int old_errors = errors(); int old_failures = failures(); - // Insert newline after first test suite. That's just for - // cosmetics. - if (num_suites > 0) { - m_log << std::endl; - } - // Log the name of the test m_log << m_names[m_index] << ": "; @@ -345,19 +335,16 @@ bool GTestSuite::run(void) // Log if there are errors or failures if ((m_errors == old_errors && m_failures == old_failures)) { - m_log << " ok"; + m_log << " ok" << std::endl; } else { - m_log << " NOK"; + m_log << " NOK" << std::endl; success = false; } // Add test case to test suite m_tests.push_back(test); - // Increment test suite counter - num_suites++; - } // endif: test case has a function pointer } // endwhile: there were tests on the stack diff --git a/src/test/GTestSuites.cpp b/src/test/GTestSuites.cpp index e291be3..cb6f834 100644 --- a/src/test/GTestSuites.cpp +++ b/src/test/GTestSuites.cpp @@ -239,9 +239,14 @@ void GTestSuites::append(GTestSuite& suite) ***************************************************************************/ bool GTestSuites::run(void) { + // Set header + std::string text = "* " + name() + " *"; + std::string frame = fill("*", text.length()); + // Log name of test suites - m_log << std::endl; - m_log.header1(name()); + m_log << std::endl << frame; + m_log << std::endl << text; + m_log << std::endl << frame; // Initialise success flag bool success = true; -- libgit2 0.21.4