test/testautomation_pixels.c
changeset 7721 bdf8c2c84e14
parent 7677 871d43c6968a
child 7879 cee8a400dc51
     1.1 --- a/test/testautomation_pixels.c	Thu Aug 29 08:29:51 2013 -0700
     1.2 +++ b/test/testautomation_pixels.c	Thu Aug 29 08:30:21 2013 -0700
     1.3 @@ -242,7 +242,7 @@
     1.4    SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
     1.5    SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
     1.6    if (result != NULL) {
     1.7 -      SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty");
     1.8 +      SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
     1.9        SDLTest_AssertCheck(SDL_strcmp(result, unknownFormat) == 0,
    1.10          "Verify result text; expected: %s, got %s", unknownFormat, result);
    1.11    }
    1.12 @@ -257,7 +257,7 @@
    1.13      SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
    1.14      SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
    1.15      if (result != NULL) {
    1.16 -      SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty");
    1.17 +      SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
    1.18        SDLTest_AssertCheck(SDL_strcmp(result, _RGBPixelFormatsVerbose[i]) == 0,
    1.19          "Verify result text; expected: %s, got %s", _RGBPixelFormatsVerbose[i], result);
    1.20      }
    1.21 @@ -273,7 +273,7 @@
    1.22      SDLTest_AssertPass("Call to SDL_GetPixelFormatName()");
    1.23      SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
    1.24      if (result != NULL) {
    1.25 -      SDLTest_AssertCheck(SDL_strlen(result) > 0, "Verify result is non-empty");
    1.26 +      SDLTest_AssertCheck(result[0] != '\0', "Verify result is non-empty");
    1.27        SDLTest_AssertCheck(SDL_strcmp(result, _nonRGBPixelFormatsVerbose[i]) == 0,
    1.28          "Verify result text; expected: %s, got %s", _nonRGBPixelFormatsVerbose[i], result);
    1.29      }
    1.30 @@ -290,14 +290,14 @@
    1.31      SDLTest_AssertPass("Call to SDL_GetPixelFormatName(%u)", format);
    1.32      SDLTest_AssertCheck(result != NULL, "Verify result is not NULL");
    1.33      if (result != NULL) {
    1.34 -      SDLTest_AssertCheck(SDL_strlen(result) > 0,
    1.35 +      SDLTest_AssertCheck(result[0] != '\0',
    1.36          "Verify result is non-empty; got: %s", result);
    1.37        SDLTest_AssertCheck(SDL_strcmp(result, _invalidPixelFormatsVerbose[i]) == 0,
    1.38          "Validate name is UNKNOWN, expected: '%s', got: '%s'", _invalidPixelFormatsVerbose[i], result);
    1.39      }
    1.40      error = SDL_GetError();
    1.41      SDLTest_AssertPass("Call to SDL_GetError()");
    1.42 -    SDLTest_AssertCheck(error != NULL && SDL_strlen(error) == 0, "Validate that error message is empty");
    1.43 +    SDLTest_AssertCheck(error != NULL && error[0] != '\0', "Validate that error message is empty");
    1.44    }
    1.45  
    1.46    return TEST_COMPLETED;