mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-31 08:57:40 +00:00
SDL_GUIDFromString() renamed SDL_StringToGUID()
This commit is contained in:
parent
5e12706ae0
commit
ef21e31a9a
10 changed files with 30 additions and 16 deletions
|
@ -72,14 +72,14 @@ upper_lower_to_bytestring(Uint8 *out, Uint64 upper, Uint64 lower)
|
|||
/**
|
||||
* Check String-to-GUID conversion
|
||||
*
|
||||
* \sa SDL_GUIDFromString
|
||||
* \sa SDL_StringToGUID
|
||||
*/
|
||||
static int
|
||||
TestGuidFromString(void *arg)
|
||||
TestStringToGUID(void *arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
SDLTest_AssertPass("Call to SDL_GUIDFromString");
|
||||
SDLTest_AssertPass("Call to SDL_StringToGUID");
|
||||
for (i = 0; i < NUM_TEST_GUIDS; ++i) {
|
||||
Uint8 expected[16];
|
||||
SDL_GUID guid;
|
||||
|
@ -87,7 +87,7 @@ TestGuidFromString(void *arg)
|
|||
upper_lower_to_bytestring(expected,
|
||||
test_guids[i].upper, test_guids[i].lower);
|
||||
|
||||
guid = SDL_GUIDFromString(test_guids[i].str);
|
||||
guid = SDL_StringToGUID(test_guids[i].str);
|
||||
SDLTest_AssertCheck(SDL_memcmp(expected, guid.data, 16) == 0, "GUID from string, GUID was: '%s'", test_guids[i].str);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ TestGuidFromString(void *arg)
|
|||
* \sa SDL_GUIDToString
|
||||
*/
|
||||
static int
|
||||
TestGuidToString(void *arg)
|
||||
TestGUIDToString(void *arg)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -123,11 +123,11 @@ TestGuidToString(void *arg)
|
|||
|
||||
/* GUID routine test cases */
|
||||
static const SDLTest_TestCaseReference guidTest1 = {
|
||||
(SDLTest_TestCaseFp)TestGuidFromString, "TestGuidFromString", "Call to SDL_GUIDFromString", TEST_ENABLED
|
||||
(SDLTest_TestCaseFp)TestStringToGUID, "TestStringToGUID", "Call to SDL_StringToGUID", TEST_ENABLED
|
||||
};
|
||||
|
||||
static const SDLTest_TestCaseReference guidTest2 = {
|
||||
(SDLTest_TestCaseFp)TestGuidToString, "TestGuidToString", "Call to SDL_GUIDToString", TEST_ENABLED
|
||||
(SDLTest_TestCaseFp)TestGUIDToString, "TestGUIDToString", "Call to SDL_GUIDToString", TEST_ENABLED
|
||||
};
|
||||
|
||||
/* Sequence of GUID routine test cases */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue