Fixed %p formatting when there is following text
(cherry picked from commit f4bd17deee
)
This commit is contained in:
parent
52d63ba26c
commit
3054c0dc50
2 changed files with 7 additions and 3 deletions
|
@ -181,6 +181,12 @@ int stdlib_snprintf(void *arg)
|
|||
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||
SDLTest_AssertCheck(result == SDL_strlen(expected), "Check result value, expected: %d, got: %d", (int)SDL_strlen(expected), result);
|
||||
|
||||
result = SDL_snprintf(text, sizeof(text), "A %p B", (void *)0x1234abcd);
|
||||
expected = "A 0x1234abcd B";
|
||||
SDLTest_AssertPass("Call to SDL_snprintf(text, sizeof(text), \"A %%p B\", 0x1234abcd)");
|
||||
SDLTest_AssertCheck(SDL_strcmp(text, expected) == 0, "Check text, expected: '%s', got: '%s'", expected, text);
|
||||
SDLTest_AssertCheck(result == SDL_strlen(expected), "Check result value, expected: %d, got: %d", (int)SDL_strlen(expected), result);
|
||||
|
||||
return TEST_COMPLETED;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue