size_t len = SDL_strlen(logMessage);
SDL_strlcpy(message, logMessage,len+1);
- SDL_RWops *rwops = SDL_RWFromFile("log.txt", "a+");
+// SDL_RWops *rwops = SDL_RWFromFile("log.txt", "a+");
char *text;
text = SDL_stack_alloc(char, SDLTEST_MAX_LOGMESSAGE_LENGTH);
if(text)
{
SDL_snprintf(text, SDLTEST_MAX_LOGMESSAGE_LENGTH, " INFO: %s: %s\n", SDLTest_TimestampToString(time(0)), message);
- SDL_RWwrite(rwops, text, 1, SDL_strlen(text));
+// SDL_RWwrite(rwops, text, 1, SDL_strlen(text));
SDL_stack_free(text);
}
- SDL_RWclose(rwops);
+// SDL_RWclose(rwops);
SDL_stack_free(message);
/* Log with timestamp and newline */
size_t len = SDL_strlen(logMessage);
SDL_strlcpy(message, logMessage,len+1);
- SDL_RWops *rwops = SDL_RWFromFile("log.txt", "a+");
+// SDL_RWops *rwops = SDL_RWFromFile("log.txt", "a+");
char *text;
text = SDL_stack_alloc(char, SDLTEST_MAX_LOGMESSAGE_LENGTH);
if(text)
{
SDL_snprintf(text, SDLTEST_MAX_LOGMESSAGE_LENGTH, " ERROR: %s: %s\n", SDLTest_TimestampToString(time(0)), message);
- SDL_RWwrite(rwops, text, 1, SDL_strlen(text));
+// SDL_RWwrite(rwops, text, 1, SDL_strlen(text));
SDL_stack_free(text);
}
- SDL_RWclose(rwops);
+// SDL_RWclose(rwops);
SDL_stack_free(message);
/* Log with timestamp and newline */
SDLTest_AssertPass("Call to SDL_GetHint(%s) - using define definition", (char*)_HintsEnum[i]);
result2 = (char *)SDL_GetHint((char *)_HintsVerbose[i]);
SDLTest_AssertPass("Call to SDL_GetHint(%s) - using string definition", (char*)_HintsVerbose[i]);
+
+ int res = -1;
+ if(result1!=NULL && result2!=NULL)
+ res = SDL_strcmp(result1, result2);
+
SDLTest_AssertCheck(
- (result1 == NULL && result2 == NULL) || (SDL_strcmp(result1, result2) == 0),
+ (result1 == NULL && result2 == NULL) || (res == 0),
"Verify returned values are equal; got: result1='%s' result2='%s",
(result1 == NULL) ? "null" : result1,
(result2 == NULL) ? "null" : result2);