1.1 --- a/src/test/SDL_test_harness.c Sat Dec 22 20:43:51 2012 -0800
1.2 +++ b/src/test/SDL_test_harness.c Mon Dec 24 14:43:57 2012 -0800
1.3 @@ -51,7 +51,7 @@
1.4 * \returns The generated seed string
1.5 */
1.6 char *
1.7 - SDLTest_GenerateRunSeed(const int length)
1.8 +SDLTest_GenerateRunSeed(const int length)
1.9 {
1.10 char *seed = NULL;
1.11 SDLTest_RandomContext randomContext;
1.12 @@ -97,7 +97,7 @@
1.13 *
1.14 */
1.15 Uint64
1.16 - SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iteration)
1.17 +SDLTest_GenerateExecKey(char *runSeed, char *suiteName, char *testName, int iteration)
1.18 {
1.19 SDLTest_Md5Context md5Context;
1.20 Uint64 *keys;
1.21 @@ -109,17 +109,17 @@
1.22 Uint32 entireStringLength;
1.23 char *buffer;
1.24
1.25 - if (runSeed == NULL || strlen(runSeed)==0) {
1.26 + if (runSeed == NULL || SDL_strlen(runSeed)==0) {
1.27 SDLTest_LogError("Invalid runSeed string.");
1.28 return -1;
1.29 }
1.30
1.31 - if (suiteName == NULL || strlen(suiteName)==0) {
1.32 + if (suiteName == NULL || SDL_strlen(suiteName)==0) {
1.33 SDLTest_LogError("Invalid suiteName string.");
1.34 return -1;
1.35 }
1.36
1.37 - if (testName == NULL || strlen(testName)==0) {
1.38 + if (testName == NULL || SDL_strlen(testName)==0) {
1.39 SDLTest_LogError("Invalid testName string.");
1.40 return -1;
1.41 }
1.42 @@ -130,14 +130,14 @@
1.43 }
1.44
1.45 // Convert iteration number into a string
1.46 - memset(iterationString, 0, sizeof(iterationString));
1.47 + SDL_memset(iterationString, 0, sizeof(iterationString));
1.48 SDL_snprintf(iterationString, sizeof(iterationString) - 1, "%d", iteration);
1.49
1.50 // Combine the parameters into single string
1.51 - runSeedLength = strlen(runSeed);
1.52 - suiteNameLength = strlen(suiteName);
1.53 - testNameLength = strlen(testName);
1.54 - iterationStringLength = strlen(iterationString);
1.55 + runSeedLength = SDL_strlen(runSeed);
1.56 + suiteNameLength = SDL_strlen(suiteName);
1.57 + testNameLength = SDL_strlen(testName);
1.58 + iterationStringLength = SDL_strlen(iterationString);
1.59 entireStringLength = runSeedLength + suiteNameLength + testNameLength + iterationStringLength + 1;
1.60 buffer = (char *)SDL_malloc(entireStringLength);
1.61 if (buffer == NULL) {
1.62 @@ -167,7 +167,7 @@
1.63 * \return Timer id or -1 on failure.
1.64 */
1.65 SDL_TimerID
1.66 - SDLTest_SetTestTimeout(int timeout, void (*callback)())
1.67 +SDLTest_SetTestTimeout(int timeout, void (*callback)())
1.68 {
1.69 Uint32 timeoutInMilliseconds;
1.70 SDL_TimerID timerID;
1.71 @@ -371,7 +371,7 @@
1.72 }
1.73
1.74 // Generate run see if we don't have one already
1.75 - if (userRunSeed == NULL || strlen(userRunSeed) == 0) {
1.76 + if (userRunSeed == NULL || SDL_strlen(userRunSeed) == 0) {
1.77 runSeed = SDLTest_GenerateRunSeed(16);
1.78 if (runSeed == NULL) {
1.79 SDLTest_LogError("Generating a random seed failed");
1.80 @@ -488,7 +488,7 @@
1.81 suiteCounter,
1.82 testCounter,
1.83 currentTestName);
1.84 - if (testCase->description != NULL && strlen(testCase->description)>0) {
1.85 + if (testCase->description != NULL && SDL_strlen(testCase->description)>0) {
1.86 SDLTest_Log("Test Description: '%s'",
1.87 (testCase->description) ? testCase->description : SDLTest_InvalidNameFormat);
1.88 }