test/testautomation_platform.c
changeset 9254 6c469ea796e4
parent 8605 57faccca4fab
child 9260 039714172dc3
     1.1 --- a/test/testautomation_platform.c	Sun Nov 30 22:17:12 2014 +0100
     1.2 +++ b/test/testautomation_platform.c	Sun Nov 30 20:55:27 2014 -0800
     1.3 @@ -34,16 +34,16 @@
     1.4     int ret;
     1.5  
     1.6     ret = _compareSizeOfType( sizeof(Uint8), 1 );
     1.7 -   SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected  1", sizeof(Uint8) );
     1.8 +   SDLTest_AssertCheck( ret == 0, "sizeof(Uint8) = %lu, expected  1", (unsigned long)sizeof(Uint8) );
     1.9  
    1.10     ret = _compareSizeOfType( sizeof(Uint16), 2 );
    1.11 -   SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", sizeof(Uint16) );
    1.12 +   SDLTest_AssertCheck( ret == 0, "sizeof(Uint16) = %lu, expected 2", (unsigned long)sizeof(Uint16) );
    1.13  
    1.14     ret = _compareSizeOfType( sizeof(Uint32), 4 );
    1.15 -   SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", sizeof(Uint32) );
    1.16 +   SDLTest_AssertCheck( ret == 0, "sizeof(Uint32) = %lu, expected 4", (unsigned long)sizeof(Uint32) );
    1.17  
    1.18     ret = _compareSizeOfType( sizeof(Uint64), 8 );
    1.19 -   SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", sizeof(Uint64) );
    1.20 +   SDLTest_AssertCheck( ret == 0, "sizeof(Uint64) = %lu, expected 8", (unsigned long)sizeof(Uint64) );
    1.21  
    1.22     return TEST_COMPLETED;
    1.23  }
    1.24 @@ -395,21 +395,17 @@
    1.25       len = SDL_strlen(lastError);
    1.26       SDLTest_AssertCheck(len == 0,
    1.27               "SDL_GetError(): expected message len 0, was len: %i",
    1.28 -             0,
    1.29               len);
    1.30 -     SDLTest_AssertCheck(SDL_strcmp(lastError, "") == 0,
    1.31 -             "SDL_GetError(): expected message '', was message: '%s'",
    1.32 -             lastError);
    1.33     }
    1.34  
    1.35     /* Set */
    1.36     result = SDL_SetError(probeError);
    1.37 -   SDLTest_AssertPass("SDL_SetError()");
    1.38 +   SDLTest_AssertPass("SDL_SetError('%s')", probeError);
    1.39     SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
    1.40  
    1.41     /* Check for no-op */
    1.42     result = SDL_SetError(invalidError);
    1.43 -   SDLTest_AssertPass("SDL_SetError()");
    1.44 +   SDLTest_AssertPass("SDL_SetError(NULL)");
    1.45     SDLTest_AssertCheck(result == -1, "SDL_SetError: expected -1, got: %i", result);
    1.46     lastError = (char *)SDL_GetError();
    1.47     SDLTest_AssertCheck(lastError != NULL,
    1.48 @@ -417,14 +413,9 @@
    1.49     if (lastError != NULL)
    1.50     {
    1.51       len = SDL_strlen(lastError);
    1.52 -     SDLTest_AssertCheck(len == SDL_strlen(probeError),
    1.53 -             "SDL_GetError(): expected message len %i, was len: %i",
    1.54 -             SDL_strlen(probeError),
    1.55 +     SDLTest_AssertCheck(len == 0,
    1.56 +             "SDL_GetError(): expected message len 0, was len: %i",
    1.57               len);
    1.58 -     SDLTest_AssertCheck(SDL_strcmp(lastError, probeError) == 0,
    1.59 -             "SDL_GetError(): expected message '%s', was message: '%s'",
    1.60 -             probeError,
    1.61 -             lastError);
    1.62     }
    1.63  
    1.64     /* Reset */