Commit 34b5e424 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

shlwapi/tests: Add skip statements for missing functions to the string tests.

parent c978bbee
...@@ -562,19 +562,22 @@ static void test_StrCmpA(void) ...@@ -562,19 +562,22 @@ static void test_StrCmpA(void)
ok(ChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n"); ok(ChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n");
pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA"); pStrIsIntlEqualA = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualA");
pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA"); if (pStrIsIntlEqualA)
{
if (!pStrIsIntlEqualA) ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n");
return; ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n");
}
ok(pStrIsIntlEqualA(FALSE, str1, str2, 5), "StrIsIntlEqualA(FALSE,...) isn't case-insensitive\n"); else
ok(!pStrIsIntlEqualA(TRUE, str1, str2, 5), "StrIsIntlEqualA(TRUE,...) isn't case-sensitive\n"); skip("StrIsIntlEqualA() is not available. Tests skipped\n");
if (!pIntlStrEqWorkerA)
return;
ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n"); pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA");
ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n"); if (pIntlStrEqWorkerA)
{
ok(pIntlStrEqWorkerA(FALSE, str1, str2, 5), "IntlStrEqWorkerA(FALSE,...) isn't case-insensitive\n");
ok(!pIntlStrEqWorkerA(TRUE, str1, str2, 5), "pIntlStrEqWorkerA(TRUE,...) isn't case-sensitive\n");
}
else
skip("IntlStrEqWorkerA() is not available. Tests skipped\n");
} }
static void test_StrCmpW(void) static void test_StrCmpW(void)
...@@ -588,19 +591,22 @@ static void test_StrCmpW(void) ...@@ -588,19 +591,22 @@ static void test_StrCmpW(void)
ok(ChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n"); ok(ChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n");
pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW"); pStrIsIntlEqualW = (void *)GetProcAddress(hShlwapi, "StrIsIntlEqualW");
pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW"); if (pStrIsIntlEqualW)
{
if (!pStrIsIntlEqualW) ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n");
return; ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n");
}
ok(pStrIsIntlEqualW(FALSE, str1, str2, 5), "StrIsIntlEqualW(FALSE,...) isn't case-insensitive\n"); else
ok(!pStrIsIntlEqualW(TRUE, str1, str2, 5), "StrIsIntlEqualW(TRUE,...) isn't case-sensitive\n"); skip("StrIsIntlEqualW() is not available. Tests skipped\n");
if (!pIntlStrEqWorkerW)
return;
ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n"); pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW");
ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n"); if (pIntlStrEqWorkerW)
{
ok(pIntlStrEqWorkerW(FALSE, str1, str2, 5), "IntlStrEqWorkerW(FALSE,...) isn't case-insensitive\n");
ok(!pIntlStrEqWorkerW(TRUE, str1, str2, 5), "IntlStrEqWorkerW(TRUE,...) isn't case-sensitive\n");
}
else
skip("IntlStrEqWorkerW() is not available. Tests skipped\n");
} }
static WCHAR *CoDupStrW(const char* src) static WCHAR *CoDupStrW(const char* src)
...@@ -620,7 +626,11 @@ static void test_StrRetToBSTR(void) ...@@ -620,7 +626,11 @@ static void test_StrRetToBSTR(void)
HRESULT ret; HRESULT ret;
pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR"); pStrRetToBSTR = (void *)GetProcAddress(hShlwapi, "StrRetToBSTR");
if (!pStrRetToBSTR) return; if (!pStrRetToBSTR)
{
skip("StrRetToBSTR() is not available. Tests skipped\n");
return;
}
strret.uType = STRRET_WSTR; strret.uType = STRRET_WSTR;
U(strret).pOleStr = CoDupStrW("Test"); U(strret).pOleStr = CoDupStrW("Test");
...@@ -659,7 +669,10 @@ static void test_StrCpyNXA(void) ...@@ -659,7 +669,10 @@ static void test_StrCpyNXA(void)
pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399); pStrCpyNXA = (void *)GetProcAddress(hShlwapi, (LPSTR)399);
if (!pStrCpyNXA) if (!pStrCpyNXA)
{
skip("StrCpyNXA() is not available. Tests skipped\n");
return; return;
}
memset(dest, '\n', sizeof(dest)); memset(dest, '\n', sizeof(dest));
lpszRes = pStrCpyNXA(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); lpszRes = pStrCpyNXA(dest, lpSrc, sizeof(dest)/sizeof(dest[0]));
...@@ -678,7 +691,10 @@ static void test_StrCpyNXW(void) ...@@ -678,7 +691,10 @@ static void test_StrCpyNXW(void)
pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400); pStrCpyNXW = (void *)GetProcAddress(hShlwapi, (LPSTR)400);
if (!pStrCpyNXW) if (!pStrCpyNXW)
{
skip("StrCpyNXW() is not available. Tests skipped\n");
return; return;
}
memcpy(dest, lpInit, sizeof(lpInit)); memcpy(dest, lpInit, sizeof(lpInit));
lpszRes = pStrCpyNXW(dest, lpSrc, sizeof(dest)/sizeof(dest[0])); lpszRes = pStrCpyNXW(dest, lpSrc, sizeof(dest)/sizeof(dest[0]));
...@@ -733,7 +749,10 @@ static void test_SHAnsiToAnsi(void) ...@@ -733,7 +749,10 @@ static void test_SHAnsiToAnsi(void)
pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345); pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345);
if (!pSHAnsiToAnsi) if (!pSHAnsiToAnsi)
{
skip("SHAnsiToAnsi() is not available. Tests skipped\n");
return; return;
}
memset(dest, '\n', sizeof(dest)); memset(dest, '\n', sizeof(dest));
dwRet = pSHAnsiToAnsi("hello", dest, sizeof(dest)/sizeof(dest[0])); dwRet = pSHAnsiToAnsi("hello", dest, sizeof(dest)/sizeof(dest[0]));
...@@ -752,7 +771,10 @@ static void test_SHUnicodeToUnicode(void) ...@@ -752,7 +771,10 @@ static void test_SHUnicodeToUnicode(void)
pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346); pSHUnicodeToUnicode = (void *)GetProcAddress(hShlwapi, (LPSTR)346);
if (!pSHUnicodeToUnicode) if (!pSHUnicodeToUnicode)
{
skip("SHUnicodeToUnicode() is not available. Tests skipped\n");
return; return;
}
memcpy(dest, lpInit, sizeof(lpInit)); memcpy(dest, lpInit, sizeof(lpInit));
dwRet = pSHUnicodeToUnicode(lpSrc, dest, sizeof(dest)/sizeof(dest[0])); dwRet = pSHUnicodeToUnicode(lpSrc, dest, sizeof(dest)/sizeof(dest[0]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment