Commit fb077b48 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

inetcomm/tests: Enable compilation with long types.

parent afd2e6c8
EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = inetcomm.dll
IMPORTS = inetcomm urlmon oleaut32 ole32
......
......@@ -41,9 +41,9 @@ static void test_create(void)
ULONG ref;
hr = MimeOleGetInternat(&internat);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
hr = MimeOleGetInternat(&internat2);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
/* Under w2k8 it's no longer a singleton */
if(internat == internat2)
......@@ -53,18 +53,18 @@ static void test_create(void)
ref = IMimeInternational_Release(internat2);
ok(ref == 2 ||
ref == 1, /* win95 - object is a static singleton */
"got %d\n", ref);
"got %ld\n", ref);
ref = IMimeInternational_Release(internat);
ok(ref == 1, "got %d\n", ref);
ok(ref == 1, "got %ld\n", ref);
}
else
{
ref = IMimeInternational_Release(internat2);
ok(ref == 0, "got %d\n", ref);
ok(ref == 0, "got %ld\n", ref);
ref = IMimeInternational_Release(internat);
ok(ref == 0, "got %d\n", ref);
ok(ref == 0, "got %ld\n", ref);
}
}
......@@ -153,46 +153,46 @@ static void test_charset(void)
MIMECSETINFO mlang_cs_info;
hr = MimeOleGetInternat(&internat);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
hr = IMimeInternational_FindCharset(internat, "nonexistent", &hcs);
ok(hr == MIME_E_NOT_FOUND, "got %08x\n", hr);
ok(hr == MIME_E_NOT_FOUND, "got %08lx\n", hr);
hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs_windows_1252);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IMimeInternational_FindCharset(internat, "windows-1252", &hcs);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n");
hr = IMimeInternational_FindCharset(internat, "WiNdoWs-1252", &hcs);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
ok(hcs_windows_1252 == hcs, "got different hcharsets for the same name\n");
hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
ok(hcs_windows_1252 != hcs_windows_1251, "got the same hcharset for the different names\n");
hr = IMimeInternational_GetCharsetInfo(internat, hcs_windows_1252, &cs_info);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = mlang_getcsetinfo("windows-1252", &mlang_cs_info);
ok(hr == S_OK, "got %08x\n", hr);
ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %d while mlang uiCodePage %d\n",
ok(hr == S_OK, "got %08lx\n", hr);
ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %ld while mlang uiCodePage %d\n",
cs_info.cpiWindows, mlang_cs_info.uiCodePage);
ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %d while mlang uiInternetEncoding %d\n",
ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %ld while mlang uiInternetEncoding %d\n",
cs_info.cpiInternet, mlang_cs_info.uiInternetEncoding);
ok(cs_info.hCharset == hcs_windows_1252, "hCharset doesn't match requested\n");
ok(!strcmp(cs_info.szName, "windows-1252"), "szName doesn't match requested\n");
hr = IMimeInternational_GetCodePageCharset(internat, 1252, CHARSET_BODY, &hcs);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IMimeInternational_GetCharsetInfo(internat, hcs, &cs_info);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = mlang_getcsetinfo_from_cp(1252, CHARSET_BODY, &mlang_cs_info);
ok(hr == S_OK, "got %08x\n", hr);
ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %d while mlang uiCodePage %d\n",
ok(hr == S_OK, "got %08lx\n", hr);
ok(cs_info.cpiWindows == mlang_cs_info.uiCodePage, "cpiWindows %ld while mlang uiCodePage %d\n",
cs_info.cpiWindows, mlang_cs_info.uiCodePage);
ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %d while mlang uiInternetEncoding %d\n",
ok(cs_info.cpiInternet == mlang_cs_info.uiInternetEncoding, "cpiInternet %ld while mlang uiInternetEncoding %d\n",
cs_info.cpiInternet, mlang_cs_info.uiInternetEncoding);
IMimeInternational_Release(internat);
......@@ -205,24 +205,24 @@ static void test_defaultcharset(void)
HCHARSET hcs_default, hcs, hcs_windows_1251;
hr = MimeOleGetInternat(&internat);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
hr = IMimeInternational_GetDefaultCharset(internat, &hcs_default);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
hr = IMimeInternational_GetCodePageCharset(internat, GetACP(), CHARSET_BODY, &hcs);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(hcs_default == hcs, "Unexpected default charset\n");
hr = IMimeInternational_FindCharset(internat, "windows-1251", &hcs_windows_1251);
ok(hr == S_OK, "got %08x\n", hr);
ok(hr == S_OK, "got %08lx\n", hr);
hr = IMimeInternational_SetDefaultCharset(internat, hcs_windows_1251);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
hr = IMimeInternational_GetDefaultCharset(internat, &hcs);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(hcs == hcs_windows_1251, "didn't retrieve recently set default\n");
/* Set the old default back again */
hr = IMimeInternational_SetDefaultCharset(internat, hcs_default);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
IMimeInternational_Release(internat);
}
......@@ -238,27 +238,27 @@ static void test_convert(void)
static WCHAR test_stringW[] = L"test string";
hr = MimeOleGetInternat(&internat);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
src.pBlobData = (BYTE*)test_string;
src.cbSize = sizeof(test_string);
hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read);
ok(hr == S_OK, "ret %08x\n", hr);
ok(read == sizeof(test_string), "got %d\n", read);
ok(dst.cbSize == sizeof(test_string), "got %d\n", dst.cbSize);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(read == sizeof(test_string), "got %ld\n", read);
ok(dst.cbSize == sizeof(test_string), "got %ld\n", dst.cbSize);
CoTaskMemFree(dst.pBlobData);
src.cbSize = 2;
hr = IMimeInternational_ConvertBuffer(internat, 1252, 28591, &src, &dst, &read);
ok(hr == S_OK, "ret %08x\n", hr);
ok(read == 2, "got %d\n", read);
ok(dst.cbSize == 2, "got %d\n", dst.cbSize);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(read == 2, "got %ld\n", read);
ok(dst.cbSize == 2, "got %ld\n", dst.cbSize);
CoTaskMemFree(dst.pBlobData);
prop_in.vt = VT_LPWSTR;
prop_in.pwszVal = test_stringW;
hr = IMimeInternational_ConvertString(internat, CP_UNICODE, 1252, &prop_in, &prop_out);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(prop_out.vt == VT_LPSTR, "got %d\n", prop_out.vt);
ok(!strcmp(prop_out.pszVal, test_string), "got %s\n", prop_out.pszVal);
PropVariantClear(&prop_out);
......@@ -267,7 +267,7 @@ static void test_convert(void)
prop_in.vt = VT_LPWSTR;
prop_in.pwszVal = test_stringW;
hr = IMimeInternational_ConvertString(internat, 28591, 1252, &prop_in, &prop_out);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(prop_out.vt == VT_LPSTR, "got %d\n", prop_out.vt);
ok(!strcmp(prop_out.pszVal, test_string), "got %s\n", prop_out.pszVal);
PropVariantClear(&prop_out);
......@@ -275,7 +275,7 @@ static void test_convert(void)
prop_in.vt = VT_LPSTR;
prop_in.pszVal = test_string;
hr = IMimeInternational_ConvertString(internat, 28591, CP_UNICODE, &prop_in, &prop_out);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(prop_out.vt == VT_LPWSTR, "got %d\n", prop_out.vt);
ok(!lstrcmpW(prop_out.pwszVal, test_stringW), "mismatched strings\n");
PropVariantClear(&prop_out);
......@@ -284,7 +284,7 @@ static void test_convert(void)
prop_in.vt = VT_LPSTR;
prop_in.pszVal = test_string;
hr = IMimeInternational_ConvertString(internat, CP_UNICODE, CP_UNICODE, &prop_in, &prop_out);
ok(hr == S_OK, "ret %08x\n", hr);
ok(hr == S_OK, "ret %08lx\n", hr);
ok(prop_out.vt == VT_LPWSTR, "got %d\n", prop_out.vt);
ok(!lstrcmpW(prop_out.pwszVal, test_stringW), "mismatched strings\n");
PropVariantClear(&prop_out);
......
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