Made the output of plain logger more readable.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Tue, 05 Jul 2011 21:15:34 +0300
changeset 5743 3f79a693acd3
parent 5742 443d356b5af8
child 5744 a5b70cefd30e
Made the output of plain logger more readable.
test/test-automation/plain_logger.c
--- a/test/test-automation/plain_logger.c	Mon Jul 04 20:46:06 2011 +0300
+++ b/test/test-automation/plain_logger.c	Tue Jul 05 21:15:34 2011 +0300
@@ -6,9 +6,11 @@
 
 #include <SDL/SDL.h>
 
+#include "logger_helpers.h"
 #include "plain_logger.h"
 
 
+
 static int indentLevel;
 
 /*!
@@ -38,13 +40,15 @@
 PlainRunStarted(int parameterCount, char *runnerParameters[], time_t eventTime,
 				void *data)
 {
-	/*
-    Output("Test run started with following parameters\n");
+	Output(indentLevel, "Test run started at %s", TimestampToString(eventTime));
+	Output(indentLevel, "");
+    /*
+	Output(indentLevel, "Runner: ");
 
 	int counter = 0;
 	for(counter = 0; counter < parameterCount; counter++) {
 		char *parameter = runnerParameters[counter];
-		Output("\t%s", parameter);
+		Output(indentLevel, "\t%s", parameter);
 	}
 	*/
 }
@@ -53,7 +57,7 @@
 PlainRunEnded(int testCount, int suiteCount, int testPassCount, int testFailCount,
               time_t endTime, double totalRuntime)
 {
-	Output(indentLevel, "\nRan %d tests in %0.5f seconds from %d suites.",
+	Output(indentLevel, "Ran %d tests in %0.5f seconds from %d suites.",
 			testCount, totalRuntime, suiteCount);
 
 	Output(indentLevel, "%d tests passed", testPassCount);
@@ -78,7 +82,7 @@
 void
 PlainTestStarted(const char *testName, const char *suiteName, const char *testDescription, time_t startTime)
 {
-	Output(indentLevel++, "%s (in %s) started", testName, suiteName);
+	Output(indentLevel++, "Executing test: %s (in %s)", testName, suiteName);
 }
 
 void
@@ -106,10 +110,11 @@
 
 void
 PlainAssertWithValues(const char *assertName, int assertResult, const char *assertMessage,
-		int actualValue, int excpected, time_t eventTime)
+		int actualValue, int expected, time_t eventTime)
 {
 	const char *result = (assertResult) ? "passed" : "failed";
-	Output(indentLevel, "%s %d: %s", assertName, assertResult, assertMessage);
+	Output(indentLevel, "%s %d (expected %d, actualValue &d): %s",
+			assertName, assertResult, expected, actualValue, assertMessage);
 }
 
 void