Commit b4589f11faa8344b36e4ec871fb578bea7f1e48e

Authored by Jürgen Knödlseder
1 parent a712c382

Restore original test output format.

src/test/GTestSuite.cpp
... ... @@ -264,14 +264,10 @@ bool GTestSuite::run(void)
264 264  
265 265 // Log name of test suite
266 266 m_log << std::endl;
267   - //m_log.header3(this->name());
268 267  
269 268 // Initialise success flag
270 269 bool success = true;
271 270  
272   - // Initialise test suite counter
273   - int num_suites = 0;
274   -
275 271 // Loop over all functions in suite
276 272 for (m_index = 0; m_index < m_functions.size(); ++m_index) {
277 273  
... ... @@ -284,12 +280,6 @@ bool GTestSuite::run(void)
284 280 int old_errors = errors();
285 281 int old_failures = failures();
286 282  
287   - // Insert newline after first test suite. That's just for
288   - // cosmetics.
289   - if (num_suites > 0) {
290   - m_log << std::endl;
291   - }
292   -
293 283 // Log the name of the test
294 284 m_log << m_names[m_index] << ": ";
295 285  
... ... @@ -345,19 +335,16 @@ bool GTestSuite::run(void)
345 335  
346 336 // Log if there are errors or failures
347 337 if ((m_errors == old_errors && m_failures == old_failures)) {
348   - m_log << " ok";
  338 + m_log << " ok" << std::endl;
349 339 }
350 340 else {
351   - m_log << " NOK";
  341 + m_log << " NOK" << std::endl;
352 342 success = false;
353 343 }
354 344  
355 345 // Add test case to test suite
356 346 m_tests.push_back(test);
357 347  
358   - // Increment test suite counter
359   - num_suites++;
360   -
361 348 } // endif: test case has a function pointer
362 349  
363 350 } // endwhile: there were tests on the stack
... ...
src/test/GTestSuites.cpp
... ... @@ -239,9 +239,14 @@ void GTestSuites::append(GTestSuite&amp; suite)
239 239 ***************************************************************************/
240 240 bool GTestSuites::run(void)
241 241 {
  242 + // Set header
  243 + std::string text = "* " + name() + " *";
  244 + std::string frame = fill("*", text.length());
  245 +
242 246 // Log name of test suites
243   - m_log << std::endl;
244   - m_log.header1(name());
  247 + m_log << std::endl << frame;
  248 + m_log << std::endl << text;
  249 + m_log << std::endl << frame;
245 250  
246 251 // Initialise success flag
247 252 bool success = true;
... ...