test/testautomation_rwops.c
changeset 10782 1de6d4633ee6
parent 9260 039714172dc3
child 11416 7e7d8a125d6a
     1.1 --- a/test/testautomation_rwops.c	Sat Jan 07 19:55:29 2017 -0500
     1.2 +++ b/test/testautomation_rwops.c	Sat Jan 07 22:24:45 2017 -0500
     1.3 @@ -111,10 +111,10 @@
     1.4     s = SDL_RWwrite(rw, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1, 1);
     1.5     SDLTest_AssertPass("Call to SDL_RWwrite succeeded");
     1.6     if (write) {
     1.7 -        SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", s);
     1.8 +        SDLTest_AssertCheck(s == (size_t)1, "Verify result of writing one byte with SDL_RWwrite, expected 1, got %i", (int) s);
     1.9     }
    1.10     else {
    1.11 -        SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", s);
    1.12 +        SDLTest_AssertCheck(s == (size_t)0, "Verify result of writing with SDL_RWwrite, expected: 0, got %i", (int) s);
    1.13     }
    1.14  
    1.15     /* Test seek to random position */
    1.16 @@ -133,8 +133,8 @@
    1.17     SDLTest_AssertCheck(
    1.18         s == (size_t)(sizeof(RWopsHelloWorldTestString)-1),
    1.19         "Verify result from SDL_RWread, expected %i, got %i",
    1.20 -       sizeof(RWopsHelloWorldTestString)-1,
    1.21 -       s);
    1.22 +       (int) (sizeof(RWopsHelloWorldTestString)-1),
    1.23 +       (int) s);
    1.24     SDLTest_AssertCheck(
    1.25         SDL_memcmp(buf, RWopsHelloWorldTestString, sizeof(RWopsHelloWorldTestString)-1 ) == 0,
    1.26         "Verify read bytes match expected string, expected '%s', got '%s'", RWopsHelloWorldTestString, buf);
    1.27 @@ -144,25 +144,25 @@
    1.28     SDLTest_AssertPass("Call to SDL_RWseek(...,-4,RW_SEEK_CUR) succeeded");
    1.29     SDLTest_AssertCheck(
    1.30         i == (Sint64)(sizeof(RWopsHelloWorldTestString)-5),
    1.31 -       "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %"SDL_PRIs64,
    1.32 -       sizeof(RWopsHelloWorldTestString)-5,
    1.33 -       i);
    1.34 +       "Verify seek to -4 with SDL_RWseek (RW_SEEK_CUR), expected %i, got %i",
    1.35 +       (int) (sizeof(RWopsHelloWorldTestString)-5),
    1.36 +       (int) i);
    1.37  
    1.38     i = SDL_RWseek( rw, -1, RW_SEEK_END );
    1.39     SDLTest_AssertPass("Call to SDL_RWseek(...,-1,RW_SEEK_END) succeeded");
    1.40     SDLTest_AssertCheck(
    1.41         i == (Sint64)(sizeof(RWopsHelloWorldTestString)-2),
    1.42 -       "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %"SDL_PRIs64,
    1.43 -       sizeof(RWopsHelloWorldTestString)-2,
    1.44 -       i);
    1.45 +       "Verify seek to -1 with SDL_RWseek (RW_SEEK_END), expected %i, got %i",
    1.46 +       (int) (sizeof(RWopsHelloWorldTestString)-2),
    1.47 +       (int) i);
    1.48  
    1.49     /* Invalid whence seek */
    1.50     i = SDL_RWseek( rw, 0, 999 );
    1.51     SDLTest_AssertPass("Call to SDL_RWseek(...,0,invalid_whence) succeeded");
    1.52     SDLTest_AssertCheck(
    1.53         i == (Sint64)(-1),
    1.54 -       "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %"SDL_PRIs64,
    1.55 -       i);
    1.56 +       "Verify seek with SDL_RWseek (invalid_whence); expected: -1, got %i",
    1.57 +       (int) i);
    1.58  }
    1.59  
    1.60  /* !
    1.61 @@ -559,8 +559,8 @@
    1.62       SDLTest_AssertCheck(result == 0, "Verify result value is 0; got: %d", result);
    1.63  
    1.64       /* Compare */
    1.65 -     SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", rv_mem, rv_file);
    1.66 -     SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%"SDL_PRIu64" sv_file=%"SDL_PRIu64, sv_mem, sv_file);
    1.67 +     SDLTest_AssertCheck(rv_mem == rv_file, "Verify returned read blocks matches for mem and file reads; got: rv_mem=%d rv_file=%d", (int) rv_mem, (int) rv_file);
    1.68 +     SDLTest_AssertCheck(sv_mem == sv_file, "Verify SEEK_END position matches for mem and file seeks; got: sv_mem=%d sv_file=%d", (int) sv_mem, (int) sv_file);
    1.69       SDLTest_AssertCheck(buffer_mem[slen] == 0, "Verify mem buffer termination; expected: 0, got: %d", buffer_mem[slen]);
    1.70       SDLTest_AssertCheck(buffer_file[slen] == 0, "Verify file buffer termination; expected: 0, got: %d", buffer_file[slen]);
    1.71       SDLTest_AssertCheck(
    1.72 @@ -648,27 +648,27 @@
    1.73       /* Write test data */
    1.74       objectsWritten = SDL_WriteBE16(rw, BE16value);
    1.75       SDLTest_AssertPass("Call to SDL_WriteBE16()");
    1.76 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.77 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.78       objectsWritten = SDL_WriteBE32(rw, BE32value);
    1.79       SDLTest_AssertPass("Call to SDL_WriteBE32()");
    1.80 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.81 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.82       objectsWritten = SDL_WriteBE64(rw, BE64value);
    1.83       SDLTest_AssertPass("Call to SDL_WriteBE64()");
    1.84 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.85 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.86       objectsWritten = SDL_WriteLE16(rw, LE16value);
    1.87       SDLTest_AssertPass("Call to SDL_WriteLE16()");
    1.88 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.89 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.90       objectsWritten = SDL_WriteLE32(rw, LE32value);
    1.91       SDLTest_AssertPass("Call to SDL_WriteLE32()");
    1.92 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.93 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.94       objectsWritten = SDL_WriteLE64(rw, LE64value);
    1.95       SDLTest_AssertPass("Call to SDL_WriteLE64()");
    1.96 -     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", objectsWritten);
    1.97 +     SDLTest_AssertCheck(objectsWritten == 1, "Validate number of objects written, expected: 1, got: %i", (int) objectsWritten);
    1.98  
    1.99       /* Test seek to start */
   1.100       result = SDL_RWseek( rw, 0, RW_SEEK_SET );
   1.101       SDLTest_AssertPass("Call to SDL_RWseek succeeded");
   1.102 -     SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %"SDL_PRIs64, result);
   1.103 +     SDLTest_AssertCheck(result == 0, "Verify result from position 0 with SDL_RWseek, expected 0, got %i", (int) result);
   1.104  
   1.105       /* Read test data */
   1.106       BE16test = SDL_ReadBE16(rw);