Minor cleaning.
authorMarkus Kauppila <markus.kauppila@gmail.com>
Sun, 28 Aug 2011 22:18:56 +0300
changeset 5848 7b1f38d183d0
parent 5847 a711145cc9e2
child 5849 ea19931692db
Minor cleaning.
test/test-automation/src/runner/runner.c
test/test-automation/tests/testrender/testrender.c
--- a/test/test-automation/src/runner/runner.c	Sun Aug 28 22:06:56 2011 +0300
+++ b/test/test-automation/src/runner/runner.c	Sun Aug 28 22:18:56 2011 +0300
@@ -1310,6 +1310,19 @@
    }
 }
 
+void
+InitRunner()
+{
+	// Inits some global buffers to their default values
+	memcpy(log_basename, (void *)DEFAULT_LOG_FILENAME, SDL_strlen(DEFAULT_LOG_FILENAME));
+	memcpy(log_directory, (void *)DEFAULT_LOG_DIRECTORY, SDL_strlen(DEFAULT_LOG_DIRECTORY));
+
+	memset(selected_test_name, 0, NAME_BUFFER_SIZE);
+	memset(selected_suite_name, 0, NAME_BUFFER_SIZE);
+	memset(testcase_name_substring, 0, NAME_BUFFER_SIZE);
+	memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE);
+}
+
 
 /*!
  * Entry point for test runner
@@ -1320,16 +1333,7 @@
 int
 main(int argc, char *argv[])
 {
-	// \todo turn this into something better.
-	// Inits some global buffers to their default values
-	memcpy(log_basename, (void *)DEFAULT_LOG_FILENAME, SDL_strlen(DEFAULT_LOG_FILENAME));
-	memcpy(log_directory, (void *)DEFAULT_LOG_DIRECTORY, SDL_strlen(DEFAULT_LOG_DIRECTORY));
-
-	memset(selected_test_name, 0, NAME_BUFFER_SIZE);
-	memset(selected_suite_name, 0, NAME_BUFFER_SIZE);
-	memset(testcase_name_substring, 0, NAME_BUFFER_SIZE);
-	memset(xsl_stylesheet_name, 0, NAME_BUFFER_SIZE);
-
+	InitRunner();
 
 	ParseOptions(argc, argv);
 
--- a/test/test-automation/tests/testrender/testrender.c	Sun Aug 28 22:06:56 2011 +0300
+++ b/test/test-automation/tests/testrender/testrender.c	Sun Aug 28 22:18:56 2011 +0300
@@ -501,8 +501,7 @@
    SDL_Rect rect;
 
    /* Clear surface. */
-   if (_clearScreen())
-      return -1;
+   _clearScreen();
 
    /* Steps to take. */
    ni     = SCREEN_W - FACE_W;