test/testautomation_sdltest.c
changeset 7721 bdf8c2c84e14
parent 7614 af0bd07212bd
child 8605 57faccca4fab
     1.1 --- a/test/testautomation_sdltest.c	Thu Aug 29 08:29:51 2013 -0700
     1.2 +++ b/test/testautomation_sdltest.c	Thu Aug 29 08:30:21 2013 -0700
     1.3 @@ -192,7 +192,7 @@
     1.4      "Validate result value for parameters (1,255,SDL_FALSE); expected: 0, got: %lld", uresult);
     1.5    lastError = (char *)SDL_GetError();
     1.6    SDLTest_AssertPass("SDL_GetError()");
     1.7 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
     1.8 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
     1.9  
    1.10    /* RandomUintXBoundaryValue(0, 0xfe, SDL_FALSE) returns 0xff (no error) */
    1.11    uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 254, SDL_FALSE);
    1.12 @@ -202,7 +202,7 @@
    1.13      "Validate result value for parameters (0,254,SDL_FALSE); expected: 0xff, got: %lld", uresult);
    1.14    lastError = (char *)SDL_GetError();
    1.15    SDLTest_AssertPass("SDL_GetError()");
    1.16 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.17 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.18  
    1.19    /* RandomUintXBoundaryValue(0, 0xff, SDL_FALSE) returns 0 (sets error) */
    1.20    uresult = (Uint64)SDLTest_RandomUint8BoundaryValue(0, 255, SDL_FALSE);
    1.21 @@ -302,7 +302,7 @@
    1.22      "Validate result value for parameters (1,0xffff,SDL_FALSE); expected: 0, got: %lld", uresult);
    1.23    lastError = (char *)SDL_GetError();
    1.24    SDLTest_AssertPass("SDL_GetError()");
    1.25 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.26 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.27  
    1.28    /* RandomUintXBoundaryValue(0, 0xfffe, SDL_FALSE) returns 0xffff (no error) */
    1.29    uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xfffe, SDL_FALSE);
    1.30 @@ -312,7 +312,7 @@
    1.31      "Validate result value for parameters (0,0xfffe,SDL_FALSE); expected: 0xffff, got: %lld", uresult);
    1.32    lastError = (char *)SDL_GetError();
    1.33    SDLTest_AssertPass("SDL_GetError()");
    1.34 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.35 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.36  
    1.37    /* RandomUintXBoundaryValue(0, 0xffff, SDL_FALSE) returns 0 (sets error) */
    1.38    uresult = (Uint64)SDLTest_RandomUint16BoundaryValue(0, 0xffff, SDL_FALSE);
    1.39 @@ -412,7 +412,7 @@
    1.40      "Validate result value for parameters (1,0xffffffff,SDL_FALSE); expected: 0, got: %lld", uresult);
    1.41    lastError = (char *)SDL_GetError();
    1.42    SDLTest_AssertPass("SDL_GetError()");
    1.43 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.44 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.45  
    1.46    /* RandomUintXBoundaryValue(0, 0xfffffffe, SDL_FALSE) returns 0xffffffff (no error) */
    1.47    uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xfffffffe, SDL_FALSE);
    1.48 @@ -422,7 +422,7 @@
    1.49      "Validate result value for parameters (0,0xfffffffe,SDL_FALSE); expected: 0xffffffff, got: %lld", uresult);
    1.50    lastError = (char *)SDL_GetError();
    1.51    SDLTest_AssertPass("SDL_GetError()");
    1.52 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.53 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.54  
    1.55    /* RandomUintXBoundaryValue(0, 0xffffffff, SDL_FALSE) returns 0 (sets error) */
    1.56    uresult = (Uint64)SDLTest_RandomUint32BoundaryValue(0, 0xffffffff, SDL_FALSE);
    1.57 @@ -522,7 +522,7 @@
    1.58      "Validate result value for parameters (1,0xffffffffffffffff,SDL_FALSE); expected: 0, got: %lld", uresult);
    1.59    lastError = (char *)SDL_GetError();
    1.60    SDLTest_AssertPass("SDL_GetError()");
    1.61 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.62 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.63  
    1.64    /* RandomUintXBoundaryValue(0, 0xfffffffffffffffe, SDL_FALSE) returns 0xffffffffffffffff (no error) */
    1.65    uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xfffffffffffffffeULL, SDL_FALSE);
    1.66 @@ -532,7 +532,7 @@
    1.67      "Validate result value for parameters (0,0xfffffffffffffffe,SDL_FALSE); expected: 0xffffffffffffffff, got: %lld", uresult);
    1.68    lastError = (char *)SDL_GetError();
    1.69    SDLTest_AssertPass("SDL_GetError()");
    1.70 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.71 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.72  
    1.73    /* RandomUintXBoundaryValue(0, 0xffffffffffffffff, SDL_FALSE) returns 0 (sets error) */
    1.74    uresult = (Uint64)SDLTest_RandomUint64BoundaryValue(0, (Uint64)0xffffffffffffffffULL, SDL_FALSE);
    1.75 @@ -632,7 +632,7 @@
    1.76      "Validate result value for parameters (SCHAR_MIN + 1,SCHAR_MAX,SDL_FALSE); expected: %d, got: %lld", SCHAR_MIN, sresult);
    1.77    lastError = (char *)SDL_GetError();
    1.78    SDLTest_AssertPass("SDL_GetError()");
    1.79 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.80 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.81  
    1.82    /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX - 1, SDL_FALSE) returns SCHAR_MAX (no error) */
    1.83    sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX -1, SDL_FALSE);
    1.84 @@ -642,7 +642,7 @@
    1.85      "Validate result value for parameters (SCHAR_MIN,SCHAR_MAX - 1,SDL_FALSE); expected: %d, got: %lld", SCHAR_MAX, sresult);
    1.86    lastError = (char *)SDL_GetError();
    1.87    SDLTest_AssertPass("SDL_GetError()");
    1.88 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.89 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.90  
    1.91    /* RandomSintXBoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE) returns SCHAR_MIN (sets error) */
    1.92    sresult = (Sint64)SDLTest_RandomSint8BoundaryValue(SCHAR_MIN, SCHAR_MAX, SDL_FALSE);
    1.93 @@ -742,7 +742,7 @@
    1.94      "Validate result value for parameters (SHRT_MIN+1,SHRT_MAX,SDL_FALSE); expected: %d, got: %lld", SHRT_MIN, sresult);
    1.95    lastError = (char *)SDL_GetError();
    1.96    SDLTest_AssertPass("SDL_GetError()");
    1.97 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
    1.98 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
    1.99  
   1.100    /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE) returns SHRT_MAX (no error) */
   1.101    sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX - 1, SDL_FALSE);
   1.102 @@ -752,7 +752,7 @@
   1.103      "Validate result value for parameters (SHRT_MIN,SHRT_MAX - 1,SDL_FALSE); expected: %d, got: %lld", SHRT_MAX, sresult);
   1.104    lastError = (char *)SDL_GetError();
   1.105    SDLTest_AssertPass("SDL_GetError()");
   1.106 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
   1.107 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
   1.108  
   1.109    /* RandomSintXBoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE) returns 0 (sets error) */
   1.110    sresult = (Sint64)SDLTest_RandomSint16BoundaryValue(SHRT_MIN, SHRT_MAX, SDL_FALSE);
   1.111 @@ -859,7 +859,7 @@
   1.112      "Validate result value for parameters (LONG_MIN+1,LONG_MAX,SDL_FALSE); expected: %d, got: %lld", long_min, sresult);
   1.113    lastError = (char *)SDL_GetError();
   1.114    SDLTest_AssertPass("SDL_GetError()");
   1.115 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
   1.116 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
   1.117  
   1.118    /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX - 1, SDL_FALSE) returns LONG_MAX (no error) */
   1.119    sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max - 1, SDL_FALSE);
   1.120 @@ -869,7 +869,7 @@
   1.121      "Validate result value for parameters (LONG_MIN,LONG_MAX - 1,SDL_FALSE); expected: %d, got: %lld", long_max, sresult);
   1.122    lastError = (char *)SDL_GetError();
   1.123    SDLTest_AssertPass("SDL_GetError()");
   1.124 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
   1.125 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
   1.126  
   1.127    /* RandomSintXBoundaryValue(LONG_MIN, LONG_MAX, SDL_FALSE) returns 0 (sets error) */
   1.128    sresult = (Sint64)SDLTest_RandomSint32BoundaryValue(long_min, long_max, SDL_FALSE);
   1.129 @@ -969,7 +969,7 @@
   1.130      "Validate result value for parameters (LLONG_MIN+1,LLONG_MAX,SDL_FALSE); expected: %lld, got: %lld", LLONG_MIN, sresult);
   1.131    lastError = (char *)SDL_GetError();
   1.132    SDLTest_AssertPass("SDL_GetError()");
   1.133 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
   1.134 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
   1.135  
   1.136    /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE) returns LLONG_MAX (no error) */
   1.137    sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, LLONG_MAX - 1, SDL_FALSE);
   1.138 @@ -979,7 +979,7 @@
   1.139      "Validate result value for parameters (LLONG_MIN,LLONG_MAX - 1,SDL_FALSE); expected: %lld, got: %lld", LLONG_MAX, sresult);
   1.140    lastError = (char *)SDL_GetError();
   1.141    SDLTest_AssertPass("SDL_GetError()");
   1.142 -  SDLTest_AssertCheck(lastError == NULL || SDL_strlen(lastError) == 0, "Validate no error message was set");
   1.143 +  SDLTest_AssertCheck(lastError == NULL || lastError[0] == '\0', "Validate no error message was set");
   1.144  
   1.145    /* RandomSintXBoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE) returns 0 (sets error) */
   1.146    sresult = (Sint64)SDLTest_RandomSint64BoundaryValue(LLONG_MIN, LLONG_MAX, SDL_FALSE);