Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions proxy/InkAPITest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7834,7 +7834,7 @@ REGRESSION_TEST(SDK_API_UUID)(RegressionTest *test, int /* atype ATS_UNUSED */,
if (TS_SUCCESS != TSUuidInitialize(uuid, TS_UUID_V4)) {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase1", TC_FAIL, "Failed to Initialize a V4 UUID");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase1", TC_PASS, "ok");
}
Expand All @@ -7844,7 +7844,7 @@ REGRESSION_TEST(SDK_API_UUID)(RegressionTest *test, int /* atype ATS_UNUSED */,
if (TS_UUID_V4 != TSUuidVersionGet(uuid)) {
SDK_RPRINT(test, "TSUuidVersionGet", "TestCase1", TC_FAIL, "Failed to get the UUID version");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidVersionGet", "TestCase1", TC_PASS, "ok");
}
Expand All @@ -7853,14 +7853,14 @@ REGRESSION_TEST(SDK_API_UUID)(RegressionTest *test, int /* atype ATS_UNUSED */,
if (TS_SUCCESS != TSUuidCopy(uuid, machine)) {
SDK_RPRINT(test, "TSUuidCopy", "TestCase1", TC_FAIL, "Failed to copy the Machine UUID object");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidCopy", "TestCase1", TC_PASS, "ok");
str2 = TSUuidStringGet(uuid);
if (!str2 || (TS_UUID_STRING_LEN != strlen(str2)) || strcmp(str1, str2)) {
SDK_RPRINT(test, "TSUuidCopy", "TestCase2", TC_FAIL, "The copied UUID strings are not identical");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidCopy", "TestCase2", TC_PASS, "ok");
}
Expand All @@ -7870,14 +7870,14 @@ REGRESSION_TEST(SDK_API_UUID)(RegressionTest *test, int /* atype ATS_UNUSED */,
if (TS_SUCCESS != TSUuidInitialize(uuid, TS_UUID_V4)) {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase2", TC_FAIL, "Failed to re-initialize the UUID object");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase2", TC_PASS, "ok");
str2 = TSUuidStringGet(uuid);
if (!str2 || (TS_UUID_STRING_LEN != strlen(str2)) || !strcmp(str1, str2)) {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase3", TC_FAIL, "The re-initialized string is the same as before");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidInitialize", "TestCase3", TC_PASS, "ok");
}
Expand All @@ -7887,36 +7887,38 @@ REGRESSION_TEST(SDK_API_UUID)(RegressionTest *test, int /* atype ATS_UNUSED */,
if ((TS_SUCCESS != TSUuidStringParse(uuid, uuid_v1)) || (TS_UUID_V1 != TSUuidVersionGet(uuid))) {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase1", TC_FAIL, "Failed to parse the UUID v1 string");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase1", TC_PASS, "ok");
str1 = TSUuidStringGet(uuid);
if (!str1 || (TS_UUID_STRING_LEN != strlen(str1)) || strcmp(str1, uuid_v1)) {
SDK_RPRINT(test, "TSUuidStringString", "TestCase2", TC_FAIL, "The parse UUID v1 string does not match the original");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase2", TC_PASS, "ok");
}
}
if ((TS_SUCCESS != TSUuidStringParse(uuid, uuid_v4)) || (TS_UUID_V4 != TSUuidVersionGet(uuid))) {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase3", TC_FAIL, "Failed to parse the UUID v4 string");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase3", TC_PASS, "ok");
str1 = TSUuidStringGet(uuid);
if (!str1 || (TS_UUID_STRING_LEN != strlen(str1)) || strcmp(str1, uuid_v4)) {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase4", TC_FAIL, "The parse UUID v4 string does not match the original");
*pstatus = REGRESSION_TEST_FAILED;
return;
goto cleanup;
} else {
SDK_RPRINT(test, "TSUuidStringParse", "TestCase4", TC_PASS, "ok");
}
}

*pstatus = REGRESSION_TEST_PASSED;

cleanup:
TSUuidDestroy(uuid);

*pstatus = REGRESSION_TEST_PASSED;
return;
}