src/test/SDL_test_harness.c
changeset 7721 bdf8c2c84e14
parent 7678 286c42d7c5ed
child 8139 ad675d62631b
     1.1 --- a/src/test/SDL_test_harness.c	Thu Aug 29 08:29:51 2013 -0700
     1.2 +++ b/src/test/SDL_test_harness.c	Thu Aug 29 08:30:21 2013 -0700
     1.3 @@ -109,17 +109,17 @@
     1.4      Uint32 entireStringLength;
     1.5      char *buffer;
     1.6  
     1.7 -    if (runSeed == NULL || SDL_strlen(runSeed)==0) {
     1.8 +    if (runSeed == NULL || runSeed[0] == '\0') {
     1.9          SDLTest_LogError("Invalid runSeed string.");
    1.10          return -1;
    1.11      }
    1.12  
    1.13 -    if (suiteName == NULL || SDL_strlen(suiteName)==0) {
    1.14 +    if (suiteName == NULL || suiteName[0] == '\0') {
    1.15          SDLTest_LogError("Invalid suiteName string.");
    1.16          return -1;
    1.17      }
    1.18  
    1.19 -    if (testName == NULL || SDL_strlen(testName)==0) {
    1.20 +    if (testName == NULL || testName[0] == '\0') {
    1.21          SDLTest_LogError("Invalid testName string.");
    1.22          return -1;
    1.23      }
    1.24 @@ -399,7 +399,7 @@
    1.25      }
    1.26  
    1.27      /* Generate run see if we don't have one already */
    1.28 -    if (userRunSeed == NULL || SDL_strlen(userRunSeed) == 0) {
    1.29 +    if (userRunSeed == NULL || userRunSeed[0] == '\0') {
    1.30          runSeed = SDLTest_GenerateRunSeed(16);
    1.31          if (runSeed == NULL) {
    1.32              SDLTest_LogError("Generating a random seed failed");
    1.33 @@ -422,7 +422,7 @@
    1.34      SDLTest_Log("::::: Test Run /w seed '%s' started\n", runSeed);
    1.35  
    1.36      /* Initialize filtering */
    1.37 -    if (filter != NULL && SDL_strlen(filter) > 0) {
    1.38 +    if (filter != NULL && filter[0] != '\0') {
    1.39          /* Loop over all suites to check if we have a filter match */
    1.40          suiteCounter = 0;
    1.41          while (testSuites[suiteCounter] && suiteFilter == 0) {
    1.42 @@ -521,7 +521,7 @@
    1.43                          suiteCounter,
    1.44                          testCounter,
    1.45                          currentTestName);
    1.46 -                    if (testCase->description != NULL && SDL_strlen(testCase->description)>0) {
    1.47 +                    if (testCase->description != NULL && testCase->description[0] != '\0') {
    1.48                          SDLTest_Log("Test Description: '%s'",
    1.49                              (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat);
    1.50                      }