Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 5 participants
- 84522 discussions
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/scrrun/tests/Makefile.in | 1 -
dlls/scrrun/tests/dictionary.c | 320 +++++++-------
dlls/scrrun/tests/filesystem.c | 750 +++++++++++++++++----------------
3 files changed, 529 insertions(+), 542 deletions(-)
diff --git a/dlls/scrrun/tests/Makefile.in b/dlls/scrrun/tests/Makefile.in
index 88f08303eee..e9eccb686d2 100644
--- a/dlls/scrrun/tests/Makefile.in
+++ b/dlls/scrrun/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = scrrun.dll
IMPORTS = ole32 shlwapi uuid oleaut32 user32
diff --git a/dlls/scrrun/tests/dictionary.c b/dlls/scrrun/tests/dictionary.c
index d20456a5096..16a195955ac 100644
--- a/dlls/scrrun/tests/dictionary.c
+++ b/dlls/scrrun/tests/dictionary.c
@@ -40,13 +40,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -74,19 +74,19 @@ static void test_interfaces(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
VariantInit(&value);
hr = IDispatch_QueryInterface(disp, &IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IObjectWithSite, (void**)&site);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(disp, &CLSID_Dictionary);
@@ -95,12 +95,12 @@ static void test_interfaces(void)
V_VT(&value) = VT_BSTR;
V_BSTR(&value) = SysAllocString(L"a");
hr = IDictionary_Add(dict, &key, &value);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "Expected TRUE but got FALSE.\n");
VariantClear(&key);
@@ -108,13 +108,13 @@ static void test_interfaces(void)
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(L"b");
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_FALSE, "Expected FALSE but got TRUE.\n");
VariantClear(&key);
hr = IDictionary_get_Count(dict, &count);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
- ok(count == 1, "got %d, expected 1\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 1, "Unexpected value %lu.\n", count);
IDictionary_Release(dict);
IDispatch_Release(disp);
@@ -129,29 +129,29 @@ static void test_comparemode(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary_get_CompareMode(dict, NULL);
method = 10;
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == BinaryCompare, "got %d\n", method);
/* invalid mode value is not checked */
hr = IDictionary_put_CompareMode(dict, 10);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == 10, "got %d\n", method);
hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_CompareMode(dict, &method);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(method == DatabaseCompare, "got %d\n", method);
/* try to change mode of a non-empty dict */
@@ -159,10 +159,10 @@ static void test_comparemode(void)
V_I2(&key) = 0;
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_put_CompareMode(dict, BinaryCompare);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
IDictionary_Release(dict);
}
@@ -356,58 +356,56 @@ static void test_hash_value(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = NULL;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got %d\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
- for (i = 0; i < ARRAY_SIZE(str_hash_tests); i++) {
+ for (i = 0; i < ARRAY_SIZE(str_hash_tests); ++i)
+ {
expected = get_str_hash(str_hash_tests[i], BinaryCompare);
hr = IDictionary_put_CompareMode(dict, BinaryCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: binary mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
expected = get_str_hash(str_hash_tests[i], TextCompare);
hr = IDictionary_put_CompareMode(dict, TextCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: text mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
expected = get_str_hash(str_hash_tests[i], DatabaseCompare);
hr = IDictionary_put_CompareMode(dict, DatabaseCompare);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_BSTR;
V_BSTR(&key) = SysAllocString(str_hash_tests[i]);
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: db mode: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: db mode: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
VariantClear(&key);
}
@@ -415,49 +413,49 @@ static void test_hash_value(void)
V_INT(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UINT;
V_UINT(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_I1;
V_I1(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0xa1), "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0xa1), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_I8;
V_I8(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UI2;
V_UI2(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UI4;
V_UI4(&key) = 1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
for (i = 0; i < ARRAY_SIZE(int_hash_tests); i++) {
SHORT i2;
@@ -470,59 +468,53 @@ static void test_hash_value(void)
V_I2(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
i2 = int_hash_tests[i];
V_VT(&key) = VT_I2|VT_BYREF;
V_I2REF(&key) = &i2;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_I4;
V_I4(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
i4 = int_hash_tests[i];
V_VT(&key) = VT_I4|VT_BYREF;
V_I4REF(&key) = &i4;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
expected = get_num_hash((FLOAT)(BYTE)int_hash_tests[i]);
V_VT(&key) = VT_UI1;
V_UI1(&key) = int_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
ui1 = int_hash_tests[i];
V_VT(&key) = VT_UI1|VT_BYREF;
V_UI1REF(&key) = &ui1;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
}
/* nan */
@@ -533,10 +525,10 @@ static void test_hash_value(void)
V_R4(&key) = fx4.f;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hr %#lx.\n", V_I4(&hash));
/* inf */
fx4.f = 10.0;
@@ -547,9 +539,9 @@ static void test_hash_value(void)
V_R4(&key) = fx4.f;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
/* nan */
fx8.d = 10.0;
@@ -559,19 +551,19 @@ static void test_hash_value(void)
V_R8(&key) = fx8.d;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_DATE;
V_DATE(&key) = fx8.d;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k, win2k3 */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
ok(V_I4(&hash) == ~0u || broken(V_I4(&hash) == 0 /* win2k */ ||
- V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "got hash 0x%08x\n", V_I4(&hash));
+ V_I4(&hash) == 0x1f4 /* vista, win2k8 */), "Unexpected hash %#lx.\n", V_I4(&hash));
/* inf */
fx8.d = 10.0;
@@ -583,17 +575,17 @@ static void test_hash_value(void)
V_R8(&key) = fx8.d;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_DATE;
V_DATE(&key) = fx8.d;
V_I4(&hash) = 10;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
for (i = 0; i < ARRAY_SIZE(float_hash_tests); i++) {
double dbl;
@@ -606,58 +598,52 @@ static void test_hash_value(void)
V_R4(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
flt = float_hash_tests[i];
V_VT(&key) = VT_R4|VT_BYREF;
V_R4REF(&key) = &flt;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_R8;
V_R8(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
dbl = float_hash_tests[i];
V_VT(&key) = VT_R8|VT_BYREF;
V_R8REF(&key) = &dbl;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_DATE;
V_DATE(&key) = float_hash_tests[i];
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
V_VT(&key) = VT_DATE|VT_BYREF;
date = float_hash_tests[i];
V_DATEREF(&key) = &date;
VariantInit(&hash);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "%d: got hash 0x%08x, expected 0x%08x\n", i, V_I4(&hash),
- expected);
+ ok(V_I4(&hash) == expected, "%d: got hash %#lx, expected %#lx.\n", i, V_I4(&hash), expected);
}
/* interface pointers as keys */
@@ -666,9 +652,9 @@ static void test_hash_value(void)
VariantInit(&hash);
V_I4(&hash) = 1;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
/* QI doesn't work */
V_VT(&key) = VT_UNKNOWN;
@@ -676,18 +662,18 @@ static void test_hash_value(void)
VariantInit(&hash);
expected = get_ptr_hash(&test_unk2);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == ~0u, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == ~0u, "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UNKNOWN;
V_UNKNOWN(&key) = &test_unk;
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* interface without IDispatch support */
V_VT(&key) = VT_DISPATCH;
@@ -695,18 +681,18 @@ static void test_hash_value(void)
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
V_VT(&key) = VT_DISPATCH;
V_DISPATCH(&key) = &test_disp;
VariantInit(&hash);
expected = get_ptr_hash(&test_disp);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* same with BYREF */
if (0) { /* crashes on native */
@@ -720,9 +706,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
V_I4(&hash) = 1;
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == 0, "got hash 0x%08x, expected 0\n", V_I4(&hash));
+ ok(!V_I4(&hash), "Unexpected hash %#lx.\n", V_I4(&hash));
V_VT(&key) = VT_UNKNOWN|VT_BYREF;
unk = &test_unk;
@@ -730,9 +716,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
/* interface without IDispatch support */
V_VT(&key) = VT_DISPATCH|VT_BYREF;
@@ -741,9 +727,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_unk);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
V_VT(&key) = VT_DISPATCH|VT_BYREF;
disp = &test_disp;
@@ -751,9 +737,9 @@ if (0) { /* crashes on native */
VariantInit(&hash);
expected = get_ptr_hash(&test_disp);
hr = IDictionary_get_HashVal(dict, &key, &hash);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
- ok(V_I4(&hash) == expected, "got hash 0x%08x, expected 0x%08x\n", V_I4(&hash), expected);
+ ok(V_I4(&hash) == expected, "got hash %#lx, expected %#lx\n", V_I4(&hash), expected);
IDictionary_Release(dict);
}
@@ -767,7 +753,7 @@ static void test_Exists(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary_Exists(dict, NULL, NULL);
@@ -775,34 +761,34 @@ static void test_Exists(void)
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
hr = IDictionary_Exists(dict, &key, NULL);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
exists = VARIANT_TRUE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_FALSE, "got %x\n", exists);
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_R4;
V_R4(&key) = 0.0;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == CTL_E_KEY_ALREADY_EXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_KEY_ALREADY_EXISTS, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
hr = IDictionary_Exists(dict, &key, NULL);
- ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ILLEGALFUNCTIONCALL, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "got %x\n", exists);
/* key of different type, but resolves to same hash value */
@@ -810,7 +796,7 @@ static void test_Exists(void)
V_R4(&key) = 0.0;
exists = VARIANT_FALSE;
hr = IDictionary_Exists(dict, &key, &exists);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(exists == VARIANT_TRUE, "got %x\n", exists);
IDictionary_Release(dict);
@@ -825,14 +811,14 @@ static void test_Keys(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Keys(dict, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&keys);
hr = IDictionary_Keys(dict, &keys);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys));
VariantClear(&keys);
@@ -840,25 +826,25 @@ static void test_Keys(void)
V_R4(&key) = 0.0;
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&keys);
hr = IDictionary_Keys(dict, &keys);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&keys) == (VT_ARRAY|VT_VARIANT), "got %d\n", V_VT(&keys));
VariantInit(&key);
index = 0;
hr = SafeArrayGetElement(V_ARRAY(&keys), &index, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_R4, "got %d\n", V_VT(&key));
index = SafeArrayGetDim(V_ARRAY(&keys));
- ok(index == 1, "got %d\n", index);
+ ok(index == 1, "Unexpected value %ld.\n", index);
hr = SafeArrayGetUBound(V_ARRAY(&keys), 1, &index);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(index == 0, "got %d\n", index);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(index == 0, "Unexpected value %ld.\n", index);
VariantClear(&keys);
@@ -873,7 +859,7 @@ static void test_Remove(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0)
hr = IDictionary_Remove(dict, NULL);
@@ -882,14 +868,14 @@ static void test_Remove(void)
V_VT(&key) = VT_R4;
V_R4(&key) = 0.0;
hr = IDictionary_Remove(dict, &key);
- ok(hr == CTL_E_ELEMENT_NOT_FOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ELEMENT_NOT_FOUND, "Unexpected hr %#lx.\n", hr);
VariantInit(&item);
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Remove(dict, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDictionary_Release(dict);
}
@@ -902,21 +888,21 @@ static void test_Item(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 10;
V_VT(&item) = VT_I2;
V_I2(&item) = 123;
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item));
V_VT(&key) = VT_I2;
V_I2(&key) = 10;
V_VT(&item) = VT_I2;
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_EMPTY, "got %d\n", V_VT(&item));
IDictionary_Release(dict);
@@ -931,7 +917,7 @@ static void test_Add(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"testW");
V_VT(&key) = VT_I2;
@@ -939,10 +925,10 @@ static void test_Add(void)
V_VT(&item) = VT_BSTR|VT_BYREF;
V_BSTRREF(&item) = &str;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_get_Item(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&item) == VT_BSTR, "got %d\n", V_VT(&item));
SysFreeString(str);
@@ -961,107 +947,107 @@ static void test_IEnumVARIANT(void)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDictionary, (void**)&dict);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (0) /* crashes on native */
hr = IDictionary__NewEnum(dict, NULL);
hr = IDictionary__NewEnum(dict, &enum1);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary__NewEnum(dict, &enum2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(enum1 != enum2, "got %p, %p\n", enum2, enum1);
IUnknown_Release(enum2);
hr = IUnknown_QueryInterface(enum1, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(enum1);
/* dictionary is empty */
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 1;
V_VT(&item) = VT_I4;
V_I4(&item) = 100;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 4000;
V_VT(&item) = VT_I4;
V_I4(&item) = 200;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 0;
V_VT(&item) = VT_I4;
V_I4(&item) = 300;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 1, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDictionary_Remove(dict, &key);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 4000, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&key) == VT_I2, "got %d\n", V_VT(&key));
ok(V_I2(&key) == 0, "got %d\n", V_I2(&key));
- ok(fetched == 1, "got %u\n", fetched);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
/* enumeration reached the bottom, add one more pair */
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
V_VT(&key) = VT_I2;
V_I2(&key) = 13;
V_VT(&item) = VT_I4;
V_I4(&item) = 350;
hr = IDictionary_Add(dict, &key, &item);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* still doesn't work until Reset() */
VariantInit(&key);
hr = IEnumVARIANT_Next(enumvar, 1, &key, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
IEnumVARIANT_Release(enumvar);
IDictionary_Release(dict);
@@ -1077,7 +1063,7 @@ START_TEST(dictionary)
hr = CoCreateInstance(&CLSID_Dictionary, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
if(FAILED(hr)) {
- win_skip("Dictionary object is not supported: %08x\n", hr);
+ win_skip("Dictionary object is not supported: hr %#lx.\n", hr);
CoUninitialize();
return;
}
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index 24b52384aa5..098060a90bb 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -69,10 +69,10 @@ static IDrive *get_fixed_drive(void)
HRESULT hr;
hr = IFileSystem3_get_Drives(fs3, &drives);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDriveCollection_get__NewEnum(drives, (IUnknown**)&iter);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IDriveCollection_Release(drives);
while (1) {
@@ -84,14 +84,14 @@ static IDrive *get_fixed_drive(void)
drive = NULL;
break;
}
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IDrive, (void**)&drive);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&var);
hr = IDrive_get_DriveType(drive, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (type == Fixed)
break;
@@ -112,13 +112,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -153,59 +153,59 @@ static void test_interfaces(void)
test_provideclassinfo(disp, &CLSID_FileSystemObject);
hr = IDispatch_QueryInterface(disp, &IID_IObjectWithSite, (void**)&site);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- ok(hr == E_NOINTERFACE, "got 0x%08x, expected 0x%08x\n", hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, NULL, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
hr = IFileSystem3_FileExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
path = SysAllocString(L"path");
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
SysFreeString(path);
path = SysAllocString(file_path);
b = VARIANT_FALSE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got %x\n", b);
SysFreeString(path);
path = SysAllocString(windows_path);
b = VARIANT_TRUE;
hr = IFileSystem3_FileExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got %x\n", b);
SysFreeString(path);
/* Folder Exists */
hr = IFileSystem3_FolderExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x, expected 0x%08x\n", hr, E_POINTER);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
path = SysAllocString(windows_path);
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "Folder doesn't exists\n");
SysFreeString(path);
path = SysAllocString(L"c:\\Nonexistent");
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "Folder exists\n");
SysFreeString(path);
path = SysAllocString(file_path);
hr = IFileSystem3_FolderExists(fs3, path, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "Folder exists\n");
SysFreeString(path);
@@ -222,13 +222,13 @@ static void test_createfolder(void)
get_temp_path(NULL, buffW);
ret = CreateDirectoryW(buffW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* create existing directory */
path = SysAllocString(buffW);
folder = (void*)0xdeabeef;
hr = IFileSystem3_CreateFolder(fs3, path, &folder);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
SysFreeString(path);
RemoveDirectoryW(buffW);
@@ -250,98 +250,98 @@ static void test_textstream(void)
name = SysAllocString(testfileW);
b = VARIANT_FALSE;
hr = IFileSystem3_FileExists(fs3, name, &b);
- ok(hr == S_OK, "got 0x%08x, expected 0x%08x\n", hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got %x\n", b);
/* different mode combinations */
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading | ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting | ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_OpenTextFile(fs3, name, ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* try to write when open for reading */
hr = ITextStream_WriteLine(stream, name);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Write(stream, name);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_get_AtEndOfStream(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == S_OK || broken(hr == S_FALSE), "got 0x%08x\n", hr);
+ ok(hr == S_OK || broken(hr == S_FALSE), "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE, "got 0x%x\n", b);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForWriting, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE || broken(b == 10), "got 0x%x\n", b);
b = 10;
hr = ITextStream_get_AtEndOfLine(stream, &b);
todo_wine {
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE || broken(b == 10), "got 0x%x\n", b);
}
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadLine(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, name, ForAppending, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_TRUE || broken(b == 10), "got 0x%x\n", b);
b = 10;
hr = ITextStream_get_AtEndOfLine(stream, &b);
todo_wine {
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE || broken(b == 10), "got 0x%x\n", b);
}
hr = ITextStream_Read(stream, 1, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadLine(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, &data);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -352,10 +352,10 @@ todo_wine {
CloseHandle(file);
hr = IFileSystem3_OpenTextFile(fs3, name, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
b = 10;
hr = ITextStream_get_AtEndOfStream(stream, &b);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(b == VARIANT_FALSE, "got 0x%x\n", b);
ITextStream_Release(stream);
@@ -376,7 +376,7 @@ static void test_GetFileVersion(void)
path = SysAllocString(filenameW);
hr = IFileSystem3_GetFileVersion(fs3, path, &version);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*version != 0, "got %s\n", wine_dbgstr_w(version));
SysFreeString(version);
SysFreeString(path);
@@ -387,7 +387,7 @@ static void test_GetFileVersion(void)
path = SysAllocString(filenameW);
version = (void*)0xdeadbeef;
hr = IFileSystem3_GetFileVersion(fs3, path, &version);
- ok(broken(hr == S_OK) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(broken(hr == S_OK) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
ok(*version == 0, "got %s\n", wine_dbgstr_w(version));
@@ -421,13 +421,13 @@ static void test_GetParentFolderName(void)
int i;
hr = IFileSystem3_GetParentFolderName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetParentFolderName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetParentFolderName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetParentFolderName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d: unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -458,13 +458,13 @@ static void test_GetFileName(void)
int i;
hr = IFileSystem3_GetFileName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetFileName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetFileName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetFileName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d: unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -480,10 +480,10 @@ static void test_GetTempName(void)
HRESULT hr;
hr = IFileSystem3_GetTempName(fs3, NULL);
- ok(hr == E_POINTER, "GetTempName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
result = (BSTR)0xdeadbeef;
hr = IFileSystem3_GetTempName(fs3, &result);
- ok(hr == S_OK, "GetTempName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!!wcsstr( result,L".tmp"), "GetTempName returned %s, expected .tmp suffix\n", debugstr_w(result));
SysFreeString(result);
}
@@ -511,13 +511,13 @@ static void test_GetBaseName(void)
int i;
hr = IFileSystem3_GetBaseName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetBaseName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
for(i=0; i < ARRAY_SIZE(tests); i++) {
result = (BSTR)0xdeadbeef;
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
hr = IFileSystem3_GetBaseName(fs3, path, &result);
- ok(hr == S_OK, "%d) GetBaseName returned %x, expected S_OK\n", i, hr);
+ ok(hr == S_OK, "%d, unexpected hr %#lx.\n", i, hr);
if(!tests[i].result)
ok(!result, "%d) result = %s\n", i, wine_dbgstr_w(result));
else
@@ -541,10 +541,10 @@ static void test_GetAbsolutePathName(void)
HRESULT hr;
hr = IFileSystem3_GetAbsolutePathName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "GetAbsolutePathName returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetAbsolutePathName(fs3, NULL, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(L".", MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf));
SysFreeString(result);
@@ -558,14 +558,14 @@ static void test_GetAbsolutePathName(void)
path = SysAllocString(dir_match1);
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir_match1, MAX_PATH, buf2, NULL);
ok(!lstrcmpiW(buf2, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf2));
SysFreeString(result);
ok(CreateDirectoryW(dir1, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir1));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir1, MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result) || broken(!lstrcmpiW(buf2, result)), "result = %s, expected %s\n",
wine_dbgstr_w(result), wine_dbgstr_w(buf));
@@ -573,7 +573,7 @@ static void test_GetAbsolutePathName(void)
ok(CreateDirectoryW(dir2, NULL), "CreateDirectory(%s) failed\n", wine_dbgstr_w(dir2));
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if(!lstrcmpiW(buf, result) || !lstrcmpiW(buf2, result)) {
ok(!lstrcmpiW(buf, result) || broken(!lstrcmpiW(buf2, result)), "result = %s, expected %s\n",
wine_dbgstr_w(result), wine_dbgstr_w(buf));
@@ -587,7 +587,7 @@ static void test_GetAbsolutePathName(void)
SysFreeString(path);
path = SysAllocString(dir_match2);
hr = IFileSystem3_GetAbsolutePathName(fs3, path, &result);
- ok(hr == S_OK, "GetAbsolutePathName returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetFullPathNameW(dir_match2, MAX_PATH, buf, NULL);
ok(!lstrcmpiW(buf, result), "result = %s, expected %s\n", wine_dbgstr_w(result), wine_dbgstr_w(buf));
SysFreeString(result);
@@ -614,14 +614,14 @@ static void test_GetFile(void)
path = SysAllocString(pathW);
hr = IFileSystem3_GetFile(fs3, path, NULL);
- ok(hr == E_POINTER, "GetFile returned %x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetFile(fs3, NULL, &file);
- ok(hr == E_INVALIDARG, "GetFile returned %x, expected E_INVALIDARG\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
file = (IFile*)0xdeadbeef;
hr = IFileSystem3_GetFile(fs3, path, &file);
ok(!file, "file != NULL\n");
- ok(hr == CTL_E_FILENOTFOUND, "GetFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hf = CreateFileW(pathW, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_READONLY, NULL);
if(hf == INVALID_HANDLE_VALUE) {
@@ -632,21 +632,21 @@ static void test_GetFile(void)
CloseHandle(hf);
hr = IFileSystem3_GetFile(fs3, path, &file);
- ok(hr == S_OK, "GetFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFile_get_DateLastModified(file, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
date = 0.0;
hr = IFile_get_DateLastModified(file, &date);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(date > 0.0, "got %f\n", date);
hr = IFile_get_Path(file, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFile_get_Path(file, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpiW(str, pathW), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -656,53 +656,52 @@ static void test_GetFile(void)
hr = IFile_get_Attributes(file, &fa);
gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == gfa, "Unexpected flags %#x, expected %lx.\n", fa, gfa);
hr = IFile_put_Attributes(file, gfa | FILE_ATTRIBUTE_READONLY);
- ok(hr == S_OK, "put_Attributes failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(new_gfa == (gfa|FILE_ATTRIBUTE_READONLY), "new_gfa = %x, expected %x\n", new_gfa, gfa|FILE_ATTRIBUTE_READONLY);
+ ok(new_gfa == (gfa|FILE_ATTRIBUTE_READONLY), "Unexpected flags %#lx, expected %lx\n", new_gfa, gfa|FILE_ATTRIBUTE_READONLY);
hr = IFile_get_Attributes(file, &fa);
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == new_gfa, "fa = %x, expected %x\n", fa, new_gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == new_gfa, "Unexpected flags %#x, expected %lx.\n", fa, new_gfa);
hr = IFile_put_Attributes(file, gfa);
- ok(hr == S_OK, "put_Attributes failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
new_gfa = GetFileAttributesW(pathW) & FILE_ATTR_MASK;
- ok(new_gfa == gfa, "new_gfa = %x, expected %x\n", new_gfa, gfa);
+ ok(new_gfa == gfa, "Unexpected flags %#lx, expected %lx.\n", new_gfa, gfa);
hr = IFile_get_Attributes(file, &fa);
- ok(hr == S_OK, "get_Attributes returned %x, expected S_OK\n", hr);
- ok(fa == gfa, "fa = %x, expected %x\n", fa, gfa);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(fa == gfa, "Unexpected flags %#x, expected %lx.\n", fa, gfa);
hr = IFile_get_Size(file, &size);
- ok(hr == S_OK, "get_Size returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_I4, "V_VT(&size) = %d, expected VT_I4\n", V_VT(&size));
- ok(V_I4(&size) == 0, "V_I4(&size) = %d, expected 0\n", V_I4(&size));
+ ok(V_I4(&size) == 0, "V_I4(&size) = %ld, expected 0\n", V_I4(&size));
IFile_Release(file);
hr = IFileSystem3_DeleteFile(fs3, path, FALSE);
- ok(hr==CTL_E_PERMISSIONDENIED || broken(hr==S_OK),
- "DeleteFile returned %x, expected CTL_E_PERMISSIONDENIED\n", hr);
+ ok(hr == CTL_E_PERMISSIONDENIED || broken(hr == S_OK), "Unexpected hr %#lx.\n", hr);
if(hr != S_OK) {
hr = IFileSystem3_DeleteFile(fs3, path, TRUE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
hr = IFileSystem3_DeleteFile(fs3, path, TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "DeleteFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(path);
/* try with directory */
lstrcatW(pathW, L"\\");
ret = CreateDirectoryW(pathW, NULL);
- ok(ret, "got %d, error %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
path = SysAllocString(pathW);
hr = IFileSystem3_GetFile(fs3, path, &file);
- ok(hr == CTL_E_FILENOTFOUND, "GetFile returned %x, expected S_OK\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(path);
RemoveDirectoryW(pathW);
@@ -743,36 +742,36 @@ static void test_CopyFolder(void)
create_path(filesystem3_dir, dstW, tmp);
bdst = SysAllocString(tmp);
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "CopyFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ok(create_file(bsrc), "can't create %s file\n", wine_dbgstr_w(bsrc));
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_DeleteFile(fs3, bsrc, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(CreateDirectoryW(bsrc, NULL), "can't create %s\n", wine_dbgstr_w(bsrc));
hr = IFileSystem3_CopyFile(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "CopyFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_FILEALREADYEXISTS, "CopyFolder returned %x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_DeleteFile(fs3, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "DeleteFile returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) == INVALID_FILE_ATTRIBUTES,
"%s file exists\n", wine_dbgstr_w(tmp));
@@ -782,7 +781,7 @@ static void test_CopyFolder(void)
SysFreeString(bdst);
bdst = SysAllocString(tmp);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) != INVALID_FILE_ATTRIBUTES,
"%s directory doesn't exist\n", wine_dbgstr_w(tmp));
@@ -795,17 +794,17 @@ static void test_CopyFolder(void)
SysFreeString(bsrc);
bsrc = SysAllocString(tmp);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
create_path(filesystem3_dir, dstW, tmp);
create_path(tmp, src1W, tmp);
ok(GetFileAttributesW(tmp) != INVALID_FILE_ATTRIBUTES,
"%s directory doesn't exist\n", wine_dbgstr_w(tmp));
hr = IFileSystem3_DeleteFolder(fs3, bdst, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == CTL_E_PATHNOTFOUND, "CopyFolder returned %x, expected CTL_E_PATHNOTFOUND\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
create_path(filesystem3_dir, src1W, tmp);
SysFreeString(bsrc);
@@ -813,19 +812,19 @@ static void test_CopyFolder(void)
create_path(tmp, src1W, tmp);
ok(create_file(tmp), "can't create %s file\n", wine_dbgstr_w(tmp));
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_FALSE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_FALSE);
- ok(hr == CTL_E_FILEALREADYEXISTS, "CopyFolder returned %x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_CopyFolder(fs3, bsrc, bdst, VARIANT_TRUE);
- ok(hr == S_OK, "CopyFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(bsrc);
SysFreeString(bdst);
bsrc = SysAllocString(filesystem3_dir);
hr = IFileSystem3_DeleteFolder(fs3, bsrc, VARIANT_FALSE);
- ok(hr == S_OK, "DeleteFolder returned %x, expected S_OK\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(bsrc);
}
@@ -868,18 +867,18 @@ static void test_BuildPath(void)
int i = 0;
hr = IFileSystem3_BuildPath(fs3, NULL, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = (BSTR)0xdeadbeef;
hr = IFileSystem3_BuildPath(fs3, NULL, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*ret == 0, "got %p\n", ret);
SysFreeString(ret);
ret = (BSTR)0xdeadbeef;
path = bstr_from_str("path");
hr = IFileSystem3_BuildPath(fs3, path, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(ret, path), "got %s\n", wine_dbgstr_w(ret));
SysFreeString(ret);
SysFreeString(path);
@@ -887,7 +886,7 @@ static void test_BuildPath(void)
ret = (BSTR)0xdeadbeef;
path = bstr_from_str("path");
hr = IFileSystem3_BuildPath(fs3, NULL, path, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(ret, path), "got %s\n", wine_dbgstr_w(ret));
SysFreeString(ret);
SysFreeString(path);
@@ -901,7 +900,7 @@ static void test_BuildPath(void)
name = bstr_from_str(ptr->name);
result = bstr_from_str(ptr->result);
hr = IFileSystem3_BuildPath(fs3, path, name, &ret);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
if (hr == S_OK)
{
ok(!lstrcmpW(ret, result), "%d: got wrong path %s, expected %s\n", i, wine_dbgstr_w(ret),
@@ -926,28 +925,28 @@ static void test_GetFolder(void)
folder = (void*)0xdeadbeef;
hr = IFileSystem3_GetFolder(fs3, NULL, &folder);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
hr = IFileSystem3_GetFolder(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* something that doesn't exist */
str = SysAllocString(L"dummy");
hr = IFileSystem3_GetFolder(fs3, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
folder = (void*)0xdeadbeef;
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == CTL_E_PATHNOTFOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ok(folder == NULL, "got %p\n", folder);
SysFreeString(str);
GetWindowsDirectoryW(buffW, MAX_PATH);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
test_provideclassinfo(folder, &CLSID_Folder);
IFolder_Release(folder);
@@ -961,17 +960,17 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
VARIANT var, var2;
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
/* clone enumerator */
hr = IEnumVARIANT_Clone(enumvar, &clone);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
ok(clone != enumvar, "%d: got %p, %p\n", line, enumvar, clone);
/* check if clone inherits position */
@@ -980,21 +979,21 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
hr = IEnumVARIANT_Next(clone, 1, &var2, &fetched);
if (position_inherited && count == 1)
{
- ok(hr == S_FALSE, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 0, "%d: got %d\n", line, fetched);
+ ok(hr == S_FALSE, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(!fetched, "%d: unexpected value %lu.\n", line, fetched);
}
else
{
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
if (!position_inherited)
todo_wine ok(V_DISPATCH(&var) == V_DISPATCH(&var2), "%d: values don't match\n", line);
else
{
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
- ok(fetched == 1, "%d: got %d\n", line, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", line, fetched);
todo_wine ok(V_DISPATCH(&var) == V_DISPATCH(&var2), "%d: values don't match\n", line);
}
}
@@ -1004,7 +1003,7 @@ static void _test_clone(IEnumVARIANT *enumvar, BOOL position_inherited, LONG cou
IEnumVARIANT_Release(clone);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "%d: got 0x%08x\n", line, hr);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", line, hr);
}
#define test_clone(a, b, c) _test_clone(a, b, c, __LINE__)
@@ -1017,7 +1016,7 @@ static void test_FolderCollection(void)
IFolderCollection *folders;
WCHAR buffW[MAX_PATH], pathW[MAX_PATH];
IEnumVARIANT *enumvar;
- LONG count, ref, ref2, i;
+ LONG count, ref, ref2;
IUnknown *unk, *unk2;
IFolder *folder;
ULONG fetched;
@@ -1025,23 +1024,24 @@ static void test_FolderCollection(void)
HRESULT hr;
BSTR str;
int found_a = 0, found_b = 0, found_c = 0;
+ unsigned int i;
get_temp_path(L"foo", buffW);
CreateDirectoryW(buffW, NULL);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_get_SubFolders(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpiW(buffW, str), "got %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(buffW));
SysFreeString(str);
@@ -1054,14 +1054,14 @@ static void test_FolderCollection(void)
CreateDirectoryW(pathW, NULL);
hr = IFolder_get_SubFolders(folder, &folders);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(folders, &CLSID_Folders);
IFolder_Release(folder);
count = 0;
hr = IFolderCollection_get_Count(folders, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 2, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 2, "Unexpected value %lu.\n", count);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, cW);
@@ -1070,37 +1070,37 @@ static void test_FolderCollection(void)
/* every time property is requested it scans directory */
count = 0;
hr = IFolderCollection_get_Count(folders, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 3, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 3, "Unexpected value %lu.\n", count);
hr = IFolderCollection_get__NewEnum(folders, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFolderCollection_QueryInterface(folders, &IID_IEnumVARIANT, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* NewEnum creates new instance each time it's called */
ref = GET_REFCOUNT(folders);
unk = NULL;
hr = IFolderCollection_get__NewEnum(folders, &unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(folders);
- ok(ref2 == ref + 1, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref + 1, "Unexpected value %ld, %ld.\n", ref2, ref);
unk2 = NULL;
hr = IFolderCollection_get__NewEnum(folders, &unk2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != unk2, "got %p, %p\n", unk2, unk);
IUnknown_Release(unk2);
/* now get IEnumVARIANT */
ref = GET_REFCOUNT(folders);
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(folders);
- ok(ref2 == ref, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref, "Unexpected value %ld, %ld.\n", ref2, ref);
test_clone(enumvar, FALSE, count);
@@ -1109,16 +1109,16 @@ static void test_FolderCollection(void)
VariantInit(&var);
fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
- ok(fetched == 1, "%d: got %d\n", i, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", i, fetched);
ok(V_VT(&var) == VT_DISPATCH, "%d: got type %d\n", i, V_VT(&var));
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IFolder, (void**)&folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = IFolder_get_Name(folder, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!lstrcmpW(str, aW + 1))
found_a++;
else if (!lstrcmpW(str, bW + 1))
@@ -1140,26 +1140,26 @@ static void test_FolderCollection(void)
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&var2[0]);
VariantInit(&var2[1]);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 0, var2, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 1, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0]));
VariantClear(&var2[0]);
VariantClear(&var2[1]);
@@ -1192,7 +1192,7 @@ static void test_FileCollection(void)
IFileCollection *files;
IFile *file;
IEnumVARIANT *enumvar;
- LONG count, ref, ref2, i;
+ LONG count, ref, ref2;
IUnknown *unk, *unk2;
ULONG fetched;
VARIANT var, var2[2];
@@ -1200,17 +1200,18 @@ static void test_FileCollection(void)
BSTR str;
HANDLE file_a, file_b, file_c;
int found_a = 0, found_b = 0, found_c = 0;
+ unsigned int i;
get_temp_path(L"\\foo", buffW);
CreateDirectoryW(buffW, NULL);
str = SysAllocString(buffW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_get_Files(folder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, aW);
@@ -1222,14 +1223,14 @@ static void test_FileCollection(void)
FILE_FLAG_DELETE_ON_CLOSE, 0);
hr = IFolder_get_Files(folder, &files);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(files, &CLSID_Files);
IFolder_Release(folder);
count = 0;
hr = IFileCollection_get_Count(files, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 2, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 2, "Unexpected value %lu.\n", count);
lstrcpyW(pathW, buffW);
lstrcatW(pathW, cW);
@@ -1239,37 +1240,37 @@ static void test_FileCollection(void)
/* every time property is requested it scans directory */
count = 0;
hr = IFileCollection_get_Count(files, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count == 3, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count == 3, "Unexpected value %lu.\n", count);
hr = IFileCollection_get__NewEnum(files, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileCollection_QueryInterface(files, &IID_IEnumVARIANT, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* NewEnum creates new instance each time it's called */
ref = GET_REFCOUNT(files);
unk = NULL;
hr = IFileCollection_get__NewEnum(files, &unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(files);
- ok(ref2 == ref + 1, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref + 1, "Unexpected value %ld, %ld.\n", ref2, ref);
unk2 = NULL;
hr = IFileCollection_get__NewEnum(files, &unk2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != unk2, "got %p, %p\n", unk2, unk);
IUnknown_Release(unk2);
/* now get IEnumVARIANT */
ref = GET_REFCOUNT(files);
hr = IUnknown_QueryInterface(unk, &IID_IEnumVARIANT, (void**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref2 = GET_REFCOUNT(files);
- ok(ref2 == ref, "got %d, %d\n", ref2, ref);
+ ok(ref2 == ref, "Unexpected value %ld, %ld.\n", ref2, ref);
test_clone(enumvar, FALSE, count);
@@ -1278,17 +1279,17 @@ static void test_FileCollection(void)
VariantInit(&var);
fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_OK, "%d: got 0x%08x\n", i, hr);
- ok(fetched == 1, "%d: got %d\n", i, fetched);
+ ok(hr == S_OK, "%d: Unexpected hr %#lx.\n", i, hr);
+ ok(fetched == 1, "%d: unexpected value %lu.\n", i, fetched);
ok(V_VT(&var) == VT_DISPATCH, "%d: got type %d\n", i, V_VT(&var));
hr = IDispatch_QueryInterface(V_DISPATCH(&var), &IID_IFile, (void **)&file);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(file, &CLSID_File);
str = NULL;
hr = IFile_get_Name(file, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (!lstrcmpW(str, aW + 1))
found_a++;
else if (!lstrcmpW(str, bW + 1))
@@ -1310,26 +1311,26 @@ static void test_FileCollection(void)
VariantInit(&var);
fetched = -1;
hr = IEnumVARIANT_Next(enumvar, 1, &var, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Reset(enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 2);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantInit(&var2[0]);
VariantInit(&var2[1]);
- fetched = -1;
+ fetched = 1;
hr = IEnumVARIANT_Next(enumvar, 0, var2, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
- fetched = -1;
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
+ fetched = 0;
hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
- ok(fetched == 1, "got %d\n", fetched);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
+ ok(fetched == 1, "Unexpected value %lu.\n", fetched);
ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0]));
VariantClear(&var2[0]);
VariantClear(&var2[1]);
@@ -1355,35 +1356,35 @@ static void test_DriveCollection(void)
LONG count;
hr = IFileSystem3_get_Drives(fs3, &drives);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(drives, &CLSID_Drives);
hr = IDriveCollection_get__NewEnum(drives, (IUnknown**)&enumvar);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDriveCollection_get_Count(drives, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
count = 0;
hr = IDriveCollection_get_Count(drives, &count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(count > 0, "got %d\n", count);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(count > 0, "Unexpected value %ld.\n", count);
V_VT(&var) = VT_EMPTY;
- fetched = -1;
+ fetched = 1;
hr = IEnumVARIANT_Next(enumvar, 0, &var, &fetched);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(fetched == 0, "got %d\n", fetched);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(!fetched, "Unexpected value %lu.\n", fetched);
hr = IEnumVARIANT_Skip(enumvar, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, count);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IEnumVARIANT_Skip(enumvar, 1);
- ok(hr == S_FALSE, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
test_clone(enumvar, TRUE, count);
@@ -1393,39 +1394,39 @@ static void test_DriveCollection(void)
BSTR str;
hr = IDrive_get_DriveType(drive, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_DriveLetter(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_DriveLetter(drive, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(SysStringLen(str) == 1, "got string %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = IDrive_get_IsReady(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_TotalSize(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_AvailableSpace(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDrive_get_FreeSpace(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
if (type == Fixed) {
VARIANT_BOOL ready = VARIANT_FALSE;
VARIANT size;
hr = IDrive_get_IsReady(drive, &ready);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ready == VARIANT_TRUE, "got %x\n", ready);
if (ready != VARIANT_TRUE) {
hr = IDrive_get_DriveLetter(drive, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
skip("Drive %s is not ready, skipping some tests\n", wine_dbgstr_w(str));
@@ -1436,30 +1437,30 @@ static void test_DriveCollection(void)
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_TotalSize(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > 0, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_AvailableSpace(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > (double)INT_MAX, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
V_VT(&size) = VT_EMPTY;
hr = IDrive_get_FreeSpace(drive, &size);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&size) == VT_R8 || V_VT(&size) == VT_I4, "got %d\n", V_VT(&size));
if (V_VT(&size) == VT_R8)
ok(V_R8(&size) > 0, "got %f\n", V_R8(&size));
else
- ok(V_I4(&size) > 0, "got %d\n", V_I4(&size));
+ ok(V_I4(&size) > 0, "got %ld\n", V_I4(&size));
}
VariantClear(&var);
}
@@ -1491,27 +1492,27 @@ static void test_CreateTextFile(void)
/* dir doesn't exist */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_PATHNOTFOUND, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_PATHNOTFOUND, "Unexpected hr %#lx.\n", hr);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(stream, &CLSID_TextStream);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -1522,16 +1523,16 @@ static void test_CreateTextFile(void)
/* try to create again with no-overwrite mode */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
/* now overwrite */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* overwrite in Unicode mode, check for BOM */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1539,7 +1540,7 @@ static void test_CreateTextFile(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r == 2, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r == 2, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
ok( buffW[0] == 0xfeff, "got %04x\n", buffW[0] );
CloseHandle(file);
@@ -1566,29 +1567,29 @@ static void test_FolderCreateTextFile(void)
lstrcatW(pathW, nameW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
str = SysAllocString(dirW);
hr = IFileSystem3_GetFolder(fs3, str, &folder);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(stream, &CLSID_TextStream);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Close(stream);
- ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || hr == E_VAR_NOT_SET, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
@@ -1599,16 +1600,16 @@ static void test_FolderCreateTextFile(void)
/* try to create again with no-overwrite mode */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
/* now overwrite */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* overwrite in Unicode mode, check for BOM */
hr = IFolder_CreateTextFile(folder, nameW, VARIANT_TRUE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1616,7 +1617,7 @@ static void test_FolderCreateTextFile(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r==2, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r == 2, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
buffW[r/sizeof(WCHAR)] = 0;
buff2W[0] = 0xfeff;
@@ -1644,15 +1645,15 @@ static void test_WriteLine(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* create as ASCII file first */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_WriteLine(stream, nameW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1660,7 +1661,7 @@ static void test_WriteLine(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffA, sizeof(buffA), &r, NULL);
- ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, ARRAY_SIZE(buffW));
buffW[len] = 0;
@@ -1672,10 +1673,10 @@ static void test_WriteLine(void)
/* same for unicode file */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_WriteLine(stream, nameW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ITextStream_Release(stream);
/* check contents */
@@ -1683,7 +1684,7 @@ static void test_WriteLine(void)
ok(file != INVALID_HANDLE_VALUE, "got %p\n", file);
r = 0;
ret = ReadFile(file, buffW, sizeof(buffW), &r, NULL);
- ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError());
+ ok(ret && r, "Read %ld, got %d, error %ld.\n", r, ret, GetLastError());
buffW[r/sizeof(WCHAR)] = 0;
buff2W[0] = 0xfeff;
@@ -1714,43 +1715,43 @@ static void test_ReadAll(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* Unicode file -> read with ascii stream */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(firstlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(secondlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_ReadAll(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_ReadAll(stream, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
/* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
buffW[0] = 0;
lstrcpyA(buffA, utf16bom);
lstrcatA(buffA, "first");
@@ -1761,7 +1762,7 @@ static void test_ReadAll(void)
/* Unicode file -> read with unicode stream */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1769,30 +1770,30 @@ static void test_ReadAll(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* ReadAll one more time */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
/* ReadLine fails the same way */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
/* Open again and skip first line before ReadAll */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str != NULL, "got %p\n", str);
ok(!wcscmp(str, firstlineW), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1801,7 +1802,7 @@ static void test_ReadAll(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
@@ -1809,19 +1810,19 @@ static void test_ReadAll(void)
/* ASCII file, read with Unicode stream */
/* 1. one byte content, not enough for Unicode read */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(aW);
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_ReadAll(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef) /* win2k */, "got %p\n", str);
ITextStream_Release(stream);
@@ -1846,59 +1847,59 @@ static void test_Read(void)
get_temp_filepath(testfileW, pathW, dirW);
ret = CreateDirectoryW(dirW, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
/* Unicode file -> read with ascii stream */
nameW = SysAllocString(pathW);
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_FALSE, VARIANT_TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(firstlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(secondlineW);
hr = ITextStream_WriteLine(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_Read(stream, 0, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, -1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream, 1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, -1, &str);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 0, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
/* Buffer content is not interpreted - BOM is kept, all data is converted to WCHARs */
str = NULL;
hr = ITextStream_Read(stream, 2, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
buffW[0] = 0;
lstrcpyA(buffA, utf16bom);
@@ -1911,7 +1912,7 @@ static void test_Read(void)
/* Unicode file -> read with unicode stream */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1919,30 +1920,30 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
/* ReadAll one more time */
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 10, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
/* ReadLine fails the same way */
str = (void*)0xdeadbeef;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL || broken(str == (void*)0xdeadbeef), "got %p\n", str);
ITextStream_Release(stream);
/* Open again and skip first line before ReadAll */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str != NULL, "got %p\n", str);
SysFreeString(str);
@@ -1950,14 +1951,14 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 100, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
/* default read will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcpyW(buffW, firstlineW);
lstrcatW(buffW, L"\r\n");
@@ -1965,7 +1966,7 @@ static void test_Read(void)
lstrcatW(buffW, L"\r\n");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1973,22 +1974,22 @@ static void test_Read(void)
/* default append will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForAppending, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
lstrcatW(buffW, L"123");
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(buffW, str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -1996,60 +1997,60 @@ static void test_Read(void)
/* default write will use ASCII */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForWriting, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"123"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
/* ASCII file, read with default stream */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"test");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
/* default append will use Unicode */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForAppending, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"123");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(L"test123", str), "got %s\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -2057,21 +2058,21 @@ static void test_Read(void)
/* default write will use ASCII as well */
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForWriting, VARIANT_FALSE, TristateUseDefault, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"test string");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test string"), "got %s\n", wine_dbgstr_w(str));
ITextStream_Release(stream);
@@ -2079,19 +2080,19 @@ static void test_Read(void)
/* ASCII file, read with Unicode stream */
/* 1. one byte content, not enough for Unicode read */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"A");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
@@ -2099,25 +2100,25 @@ static void test_Read(void)
/* ASCII file, read with Unicode stream */
/* 3. one byte content, 2 are interpreted as a character, 3rd is lost */
hr = IFileSystem3_CreateTextFile(fs3, nameW, VARIANT_TRUE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"abc");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateTrue, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
str = NULL;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "got 0x%08x\n", hr);
+ ok(hr == S_FALSE || broken(hr == S_OK) /* win2003 */, "Unexpected hr %#lx.\n", hr);
ok(SysStringLen(str) == 1, "len = %u\n", SysStringLen(str));
SysFreeString(str);
str = (void*)0xdeadbeef;
hr = ITextStream_Read(stream, 500, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(str == NULL, "got %p\n", str);
ITextStream_Release(stream);
@@ -2143,7 +2144,7 @@ static void test_ReadLine(void)
get_temp_filepath(L"test.txt", path, dir);
ret = CreateDirectoryW(dir, NULL);
- ok(ret, "got %d, %d\n", ret, GetLastError());
+ ok(ret, "Unexpected retval %d, error %ld.\n", ret, GetLastError());
file = CreateFileW(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
@@ -2155,45 +2156,45 @@ static void test_ReadLine(void)
str = SysAllocString(path);
hr = IFileSystem3_OpenTextFile(fs3, str, ForReading, VARIANT_FALSE, TristateFalse, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
for (i = 0; i < 1000; i++)
{
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"first line"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"second"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!*str, "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == S_OK, "ReadLine failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"\rt\r\re \rst"), "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
}
str = NULL;
hr = ITextStream_ReadLine(stream, &str);
- ok(hr == CTL_E_ENDOFFILE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_ENDOFFILE, "Unexpected hr %#lx.\n", hr);
ok(!str, "ReadLine returned %s\n", wine_dbgstr_w(str));
SysFreeString(str);
ITextStream_Release(stream);
ret = DeleteFileW(path);
- ok(ret, "DeleteFile failed: %u\n", GetLastError());
+ ok(ret, "Unexpected retval %ld.\n", GetLastError());
ret = RemoveDirectoryW(dir);
- ok(ret, "RemoveDirectory failed: %u\n", GetLastError());
+ ok(ret, "Unexpected retval %ld.\n", GetLastError());
}
struct driveexists_test {
@@ -2225,16 +2226,16 @@ static void test_DriveExists(void)
WCHAR root[] = L"?:\\";
hr = IFileSystem3_DriveExists(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret == VARIANT_FALSE, "got %x\n", ret);
drivespec = SysAllocString(root);
hr = IFileSystem3_DriveExists(fs3, drivespec, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SysFreeString(drivespec);
for (; *ptr->drivespec; ptr++) {
@@ -2254,7 +2255,7 @@ static void test_DriveExists(void)
drivespec[0] = root[0];
ret = ptr->expected_ret == VARIANT_TRUE ? VARIANT_FALSE : VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, drivespec, &ret);
- ok(hr == S_OK, "got 0x%08x for drive spec %s (%s)\n",
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s (%s)\n",
hr, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
ok(ret == ptr->expected_ret, "got %d, expected %d for drive spec %s (%s)\n",
ret, ptr->expected_ret, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
@@ -2264,7 +2265,7 @@ static void test_DriveExists(void)
ret = ptr->expected_ret == VARIANT_TRUE ? VARIANT_FALSE : VARIANT_TRUE;
hr = IFileSystem3_DriveExists(fs3, drivespec, &ret);
- ok(hr == S_OK, "got 0x%08x for drive spec %s (%s)\n",
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s (%s)\n",
hr, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
ok(ret == ptr->expected_ret, "got %d, expected %d for drive spec %s (%s)\n",
ret, ptr->expected_ret, wine_dbgstr_w(drivespec), wine_dbgstr_w(ptr->drivespec));
@@ -2296,18 +2297,18 @@ static void test_GetDriveName(void)
BSTR name;
hr = IFileSystem3_GetDriveName(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = (void*)0xdeadbeef;
hr = IFileSystem3_GetDriveName(fs3, NULL, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name == NULL, "got %p\n", name);
while (*ptr->path) {
BSTR path = SysAllocString(ptr->path);
name = (void*)0xdeadbeef;
hr = IFileSystem3_GetDriveName(fs3, path, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (name)
ok(!lstrcmpW(ptr->drive, name), "got %s, expected %s\n", wine_dbgstr_w(name), wine_dbgstr_w(ptr->drive));
else
@@ -2333,7 +2334,7 @@ static void test_GetDrive(void)
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(drive == (void*)0xdeadbeef, "got %p\n", drive);
for (root[0] = 'A'; root[0] <= 'Z'; root[0]++)
@@ -2346,7 +2347,7 @@ static void test_GetDrive(void)
drivespec = SysAllocString(root);
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, drivespec, &drive);
- ok(hr == CTL_E_DEVICEUNAVAILABLE, "got 0x%08x\n", hr);
+ ok(hr == CTL_E_DEVICEUNAVAILABLE, "Unexpected hr %#lx.\n", hr);
ok(drive == NULL, "got %p\n", drive);
SysFreeString(drivespec);
}
@@ -2358,7 +2359,7 @@ static void test_GetDrive(void)
}
hr = IDrive_get_DriveLetter(drive_fixed, &dl_fixed);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (FAILED(hr))
skip("Could not retrieve drive letter of fixed drive, skipping test.\n");
@@ -2383,7 +2384,7 @@ static void test_GetDrive(void)
drivespec = SysAllocString(ptr->drivespec);
drive = (void*)0xdeadbeef;
hr = IFileSystem3_GetDrive(fs3, drivespec, &drive);
- ok(hr == ptr->res, "got 0x%08x, expected 0x%08x for drive spec %s\n",
+ ok(hr == ptr->res, "Unexpected hr %#lx, expected %#lx for drive spec %s.\n",
hr, ptr->res, wine_dbgstr_w(ptr->drivespec));
ok(!lstrcmpW(ptr->drivespec, drivespec), "GetDrive modified its DriveSpec argument\n");
SysFreeString(drivespec);
@@ -2391,7 +2392,7 @@ static void test_GetDrive(void)
if (*ptr->driveletter) {
BSTR driveletter;
hr = IDrive_get_DriveLetter(drive, &driveletter);
- ok(hr == S_OK, "got 0x%08x for drive spec %s\n", hr, wine_dbgstr_w(ptr->drivespec));
+ ok(hr == S_OK, "Unexpected hr %#lx. for drive spec %s\n", hr, wine_dbgstr_w(ptr->drivespec));
if (SUCCEEDED(hr)) {
ok(!lstrcmpW(ptr->driveletter, driveletter), "got %s, expected %s for drive spec %s\n",
wine_dbgstr_w(driveletter), wine_dbgstr_w(ptr->driveletter),
@@ -2421,28 +2422,28 @@ static void test_SerialNumber(void)
}
hr = IDrive_get_SerialNumber(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
serial = 0xdeadbeef;
hr = IDrive_get_SerialNumber(drive, &serial);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(serial != 0xdeadbeef, "got %x\n", serial);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(serial != 0xdeadbeef, "Unexpected value %#lx.\n", serial);
hr = IDrive_get_FileSystem(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = NULL;
hr = IDrive_get_FileSystem(drive, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name != NULL, "got %p\n", name);
SysFreeString(name);
hr = IDrive_get_VolumeName(drive, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
name = NULL;
hr = IDrive_get_VolumeName(drive, &name);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(name != NULL, "got %p\n", name);
SysFreeString(name);
@@ -2470,7 +2471,7 @@ static void test_GetExtensionName(void)
path = SysAllocString(extension_tests[i].path);
ext = NULL;
hr = IFileSystem3_GetExtensionName(fs3, path, &ext);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (*extension_tests[i].ext)
ok(!lstrcmpW(ext, extension_tests[i].ext), "%d: path %s, got %s, expected %s\n", i,
wine_dbgstr_w(path), wine_dbgstr_w(ext), wine_dbgstr_w(extension_tests[i].ext));
@@ -2492,36 +2493,36 @@ static void test_GetSpecialFolder(void)
BSTR path;
hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder+1, &folder);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IFileSystem3_GetSpecialFolder(fs3, WindowsFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
SysFreeString(path);
IFolder_Release(folder);
hr = IFileSystem3_GetSpecialFolder(fs3, SystemFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW));
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
SysFreeString(path);
IFolder_Release(folder);
hr = IFileSystem3_GetSpecialFolder(fs3, TemporaryFolder, &folder);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IFolder_get_Path(folder, &path);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ret = GetTempPathW(ARRAY_SIZE(pathW), pathW);
if (ret && pathW[ret-1] == '\\')
pathW[ret-1] = 0;
@@ -2539,56 +2540,56 @@ static void test_MoveFile(void)
str = SysAllocString(L"test.txt");
hr = IFileSystem3_CreateTextFile(fs3, str, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"test");
hr = ITextStream_Write(stream, str);
- ok(hr == S_OK, "Write failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
str = SysAllocString(L"test2.txt");
hr = IFileSystem3_CreateTextFile(fs3, str, VARIANT_FALSE, VARIANT_FALSE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
ITextStream_Release(stream);
src = SysAllocString(L"test.txt");
dst = SysAllocString(L"test3.txt");
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
str = SysAllocString(L"test.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == CTL_E_FILENOTFOUND, "DeleteFile returned %x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
src = SysAllocString(L"test3.txt");
dst = SysAllocString(L"test2.txt"); /* already exists */
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == CTL_E_FILEALREADYEXISTS, "got 0x%08x, expected CTL_E_FILEALREADYEXISTS\n", hr);
+ ok(hr == CTL_E_FILEALREADYEXISTS, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
src = SysAllocString(L"nonexistent.txt");
dst = SysAllocString(L"test4.txt");
hr = IFileSystem3_MoveFile(fs3, src, dst);
- ok(hr == CTL_E_FILENOTFOUND, "got 0x%08x, expected CTL_E_FILENOTFOUND\n", hr);
+ ok(hr == CTL_E_FILENOTFOUND, "Unexpected hr %#lx.\n", hr);
SysFreeString(src);
SysFreeString(dst);
str = SysAllocString(L"test3.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"test2.txt");
hr = IFileSystem3_DeleteFile(fs3, str, VARIANT_TRUE);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
}
@@ -2613,17 +2614,17 @@ static void test_DoOpenPipeStream(void)
hr = pDoOpenPipeStream(piperead, ForReading, &stream_read);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
ok(!!stream_read, "Unexpected stream pointer.\n");
ret = WriteFile(pipewrite, testdata, sizeof(testdata), &written, NULL);
ok(ret, "Failed to write to the pipe.\n");
- ok(written == sizeof(testdata), "Write to anonymous pipe wrote %d bytes.\n", written);
+ ok(written == sizeof(testdata), "Write to anonymous pipe wrote %ld bytes.\n", written);
hr = ITextStream_Read(stream_read, 4, &str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"test"), "Unexpected data read %s.\n", wine_dbgstr_w(str));
SysFreeString(str);
@@ -2644,29 +2645,29 @@ static void test_DoOpenPipeStream(void)
stream_read = NULL;
hr = pDoOpenPipeStream(piperead, ForReading, &stream_read);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream_write = NULL;
hr = pDoOpenPipeStream(pipewrite, ForWriting, &stream_write);
todo_wine
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
{
str = SysAllocString(L"data");
hr = ITextStream_Write(stream_write, str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Write(stream_read, str);
- ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#x.\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = ITextStream_Read(stream_write, 1, &str);
- ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#x.\n", hr);
+ ok(hr == CTL_E_BADFILEMODE, "Unexpected hr %#lx.\n", hr);
hr = ITextStream_Read(stream_read, 4, &str);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!wcscmp(str, L"data"), "Unexpected data.\n");
SysFreeString(str);
}
@@ -2685,8 +2686,9 @@ START_TEST(filesystem)
hr = CoCreateInstance(&CLSID_FileSystemObject, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IFileSystem3, (void**)&fs3);
- if(FAILED(hr)) {
- win_skip("Could not create FileSystem object: %08x\n", hr);
+ if(FAILED(hr))
+ {
+ win_skip("Could not create FileSystem object, hr %#lx.\n", hr);
return;
}
--
2.34.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/wshom.ocx/tests/Makefile.in | 1 -
dlls/wshom.ocx/tests/wshom.c | 218 +++++++++++++++----------------
2 files changed, 108 insertions(+), 111 deletions(-)
diff --git a/dlls/wshom.ocx/tests/Makefile.in b/dlls/wshom.ocx/tests/Makefile.in
index 1251173ffd4..f115163aceb 100644
--- a/dlls/wshom.ocx/tests/Makefile.in
+++ b/dlls/wshom.ocx/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = wshom.ocx
IMPORTS = oleaut32 ole32 advapi32
diff --git a/dlls/wshom.ocx/tests/wshom.c b/dlls/wshom.ocx/tests/wshom.c
index c5e56c84aba..0e30ea9ed9a 100644
--- a/dlls/wshom.ocx/tests/wshom.c
+++ b/dlls/wshom.ocx/tests/wshom.c
@@ -28,9 +28,6 @@
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
-#define EXPECT_HR(hr,hr_exp) \
- ok(hr == hr_exp, "got 0x%08x, expected 0x%08x\n", hr, hr_exp)
-
#define test_provideclassinfo(a, b) _test_provideclassinfo((IDispatch*)a, b, __LINE__)
static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
{
@@ -40,13 +37,13 @@ static void _test_provideclassinfo(IDispatch *disp, const GUID *guid, int line)
HRESULT hr;
hr = IDispatch_QueryInterface(disp, &IID_IProvideClassInfo, (void **)&classinfo);
- ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "Failed to get IProvideClassInfo, %#lx.\n", hr);
hr = IProvideClassInfo_GetClassInfo(classinfo, &ti);
- ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetClassInfo() failed, %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &attr);
- ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#x.\n", hr);
+ ok_(__FILE__,line) (hr == S_OK, "GetTypeAttr() failed, %#lx.\n", hr);
ok_(__FILE__,line) (IsEqualGUID(&attr->guid, guid), "Unexpected typeinfo %s, expected %s\n", wine_dbgstr_guid(&attr->guid),
wine_dbgstr_guid(guid));
@@ -89,45 +86,45 @@ static void test_wshshell(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IDispatch, (void**)&disp);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_QueryInterface(disp, &IID_IWshShell3, (void**)&shell);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(disp, &IID_IWshShell3);
hr = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
- EXPECT_HR(hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
IDispatch_Release(disp);
hr = IUnknown_QueryInterface(shell, &IID_IWshShell3, (void**)&sh3);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_QueryInterface(sh3, &IID_IObjectWithSite, (void**)&unk);
- ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell, (void**)&unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IWshShell3_QueryInterface(sh3, &IID_IWshShell2, (void**)&unk);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(unk);
hr = IWshShell3_get_SpecialFolders(sh3, &coll);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(coll, &IID_IWshCollection);
hr = IWshCollection_QueryInterface(coll, &IID_IFolderCollection, (void**)&folders);
- EXPECT_HR(hr, E_NOINTERFACE);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IWshCollection_QueryInterface(coll, &IID_IDispatch, (void**)&disp);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IDispatch_GetTypeInfo(disp, 0, 0, &ti);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ITypeInfo_GetTypeAttr(ti, &tattr);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(IsEqualIID(&tattr->guid, &IID_IWshCollection), "got wrong type guid\n");
ITypeInfo_ReleaseTypeAttr(ti, tattr);
@@ -140,12 +137,12 @@ static void test_wshshell(void)
dp.cArgs = 1;
dp.cNamedArgs = 0;
hr = IDispatch_Invoke(disp, DISPID_VALUE, &IID_NULL, 1033, DISPATCH_PROPERTYGET, &dp, &res, &ei, &err);
- EXPECT_HR(hr, DISP_E_MEMBERNOTFOUND);
+ ok(hr == DISP_E_MEMBERNOTFOUND, "Unexpected hr %#lx.\n", hr);
/* try Item() directly, it returns directory path apparently */
V_VT(&res) = VT_EMPTY;
hr = IWshCollection_Item(coll, &arg, &res);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&res) == VT_BSTR, "got res type %d\n", V_VT(&res));
CHECK_BSTR_LENGTH(V_BSTR(&res));
SysFreeString(str);
@@ -154,54 +151,54 @@ static void test_wshshell(void)
/* CreateShortcut() */
str = SysAllocString(L"file.lnk");
hr = IWshShell3_CreateShortcut(sh3, str, &shortcut);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
hr = IDispatch_QueryInterface(shortcut, &IID_IWshShortcut, (void**)&shcut);
- EXPECT_HR(hr, S_OK);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(shortcut, &IID_IWshShortcut);
hr = IWshShortcut_get_Arguments(shcut, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShortcut_get_IconLocation(shcut, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
IWshShortcut_Release(shcut);
IDispatch_Release(shortcut);
/* ExpandEnvironmentStrings */
hr = IWshShell3_ExpandEnvironmentStrings(sh3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(L"%PATH%");
hr = IWshShell3_ExpandEnvironmentStrings(sh3, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
V_VT(&arg) = VT_BSTR;
V_BSTR(&arg) = SysAllocString(L"SYSTEM");
hr = IWshShell3_get_Environment(sh3, &arg, &env);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&arg);
hr = IWshEnvironment_get_Item(env, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
test_provideclassinfo(env, &IID_IWshEnvironment);
ret = (BSTR)0x1;
hr = IWshEnvironment_get_Item(env, NULL, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && !*ret, "got %p\n", ret);
SysFreeString(ret);
/* invalid var name */
str = SysAllocString(L"file.lnk");
hr = IWshEnvironment_get_Item(env, str, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ret = NULL;
hr = IWshEnvironment_get_Item(env, str, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && *ret == 0, "got %s\n", wine_dbgstr_w(ret));
CHECK_BSTR_LENGTH(ret);
SysFreeString(ret);
@@ -210,7 +207,7 @@ static void test_wshshell(void)
/* valid name */
str = SysAllocString(L"PATH");
hr = IWshEnvironment_get_Item(env, str, &ret);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(ret && *ret != 0, "got %s\n", wine_dbgstr_w(ret));
CHECK_BSTR_LENGTH(ret);
SysFreeString(ret);
@@ -225,24 +222,24 @@ static void test_wshshell(void)
str = SysAllocString(L"notepad.exe");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
retval = 10;
hr = IWshShell3_Run(sh3, str, NULL, &arg2, &retval);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
retval = 10;
hr = IWshShell3_Run(sh3, str, &arg, NULL, &retval);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
retval = 10;
V_VT(&arg2) = VT_ERROR;
V_ERROR(&arg2) = 0;
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == DISP_E_TYPEMISMATCH, "got 0x%08x\n", hr);
- ok(retval == 10, "got %u\n", retval);
+ ok(hr == DISP_E_TYPEMISMATCH, "Unexpected hr %#lx.\n", hr);
+ ok(retval == 10, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
V_VT(&arg2) = VT_BOOL;
@@ -251,15 +248,15 @@ static void test_wshshell(void)
retval = 0xdeadbeef;
str = SysAllocString(L"cmd.exe /c rd /s /q c:\\nosuchdir");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
retval = 0xdeadbeef;
str = SysAllocString(L"\"cmd.exe \" /c rd /s /q c:\\nosuchdir");
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
GetSystemDirectoryW(path, ARRAY_SIZE(path));
@@ -282,8 +279,8 @@ static void test_wshshell(void)
retval = 0xdeadbeef;
str = SysAllocString(buf);
hr = IWshShell3_Run(sh3, str, &arg, &arg2, &retval);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "got %u\n", retval);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ todo_wine ok(retval == ERROR_FILE_NOT_FOUND, "Unexpected retval %lu.\n", retval);
SysFreeString(str);
DeleteFileW(path2);
@@ -296,45 +293,45 @@ static void test_wshshell(void)
str = NULL;
hr = IWshShell3_get_CurrentDirectory(sh3, &str);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(str && str[0] != 0, "got empty string\n");
CHECK_BSTR_LENGTH(str);
SysFreeString(str);
hr = IWshShell3_put_CurrentDirectory(sh3, NULL);
ok(hr == E_INVALIDARG ||
- broken(hr == HRESULT_FROM_WIN32(ERROR_NOACCESS)), "got 0x%08x\n", hr);
+ broken(hr == HRESULT_FROM_WIN32(ERROR_NOACCESS)), "Unexpected hr %#lx.\n", hr);
str = SysAllocString(emptyW);
hr = IWshShell3_put_CurrentDirectory(sh3, str);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"deadparrot");
hr = IWshShell3_put_CurrentDirectory(sh3, str);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
/* Exec */
hr = IWshShell3_Exec(sh3, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_Exec(sh3, NULL, &shexec);
- ok(hr == DISP_E_EXCEPTION, "got 0x%08x\n", hr);
+ ok(hr == DISP_E_EXCEPTION, "Unexpected hr %#lx.\n", hr);
str = SysAllocString(emptyW);
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"%deadbeaf% /c echo test");
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
str = SysAllocString(L"%ComSpec% /c echo test");
hr = IWshShell3_Exec(sh3, str, &shexec);
- ok(hr == HRESULT_FROM_WIN32(ERROR_SUCCESS), "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
SysFreeString(str);
IWshCollection_Release(coll);
@@ -380,49 +377,49 @@ static void test_registry(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IWshShell3, (void**)&sh3);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* RegRead() */
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, NULL, &value);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
name = SysAllocString(L"HKEY_broken_key");
hr = IWshShell3_RegRead(sh3, name, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
SysFreeString(name);
name = SysAllocString(L"HKEY_CURRENT_USERa");
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_PATH_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
SysFreeString(name);
ret = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &root);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regsz", 0, REG_SZ, (const BYTE*)"foobar", 7);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regsz2", 0, REG_SZ, (const BYTE*)"foobar\0f", 9);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
ret = RegSetValueExA(root, "regmultisz", 0, REG_MULTI_SZ, (const BYTE*)"foo\0bar\0", 9);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
dwvalue = 10;
ret = RegSetValueExA(root, "regdword", 0, REG_DWORD, (const BYTE*)&dwvalue, sizeof(dwvalue));
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
dwvalue = 11;
ret = RegSetValueExA(root, "regbinary", 0, REG_BINARY, (const BYTE*)&dwvalue, sizeof(dwvalue));
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
/* REG_SZ */
lstrcpyW(pathW, keypathW);
@@ -430,7 +427,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_BSTR, "got %d\n", V_VT(&value));
ok(!lstrcmpW(V_BSTR(&value), L"foobar"), "got %s\n", wine_dbgstr_w(V_BSTR(&value)));
CHECK_BSTR_LENGTH(V_BSTR(&value));
@@ -443,7 +440,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_BSTR, "got %d\n", V_VT(&value));
ok(SysStringLen(V_BSTR(&value)) == 6, "len %d\n", SysStringLen(V_BSTR(&value)));
CHECK_BSTR_LENGTH(V_BSTR(&value));
@@ -456,9 +453,9 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I4, "got %d\n", V_VT(&value));
- ok(V_I4(&value) == 10, "got %d\n", V_I4(&value));
+ ok(V_I4(&value) == 10, "Unexpected value %ld.\n", V_I4(&value));
SysFreeString(name);
/* REG_BINARY */
@@ -467,26 +464,26 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == (VT_ARRAY|VT_VARIANT), "got 0x%x\n", V_VT(&value));
dim = SafeArrayGetDim(V_ARRAY(&value));
ok(dim == 1, "got %u\n", dim);
hr = SafeArrayGetLBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 0, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 0, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetUBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 3, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 3, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetVartype(V_ARRAY(&value), &vartype);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(vartype == VT_VARIANT, "got %d\n", vartype);
bound = 0;
hr = SafeArrayGetElement(V_ARRAY(&value), &bound, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&v) == VT_UI1, "got %d\n", V_VT(&v));
ok(V_UI1(&v) == 11, "got %u\n", V_UI1(&v));
VariantClear(&v);
@@ -499,7 +496,7 @@ static void test_registry(void)
name = SysAllocString(pathW);
VariantInit(&value);
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == (VT_ARRAY|VT_VARIANT), "got 0x%x\n", V_VT(&value));
SysFreeString(name);
@@ -507,20 +504,20 @@ static void test_registry(void)
ok(dim == 1, "got %u\n", dim);
hr = SafeArrayGetLBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 0, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 0, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetUBound(V_ARRAY(&value), 1, &bound);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(bound == 1, "got %u\n", bound);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(bound == 1, "Unexpected value %lu.\n", bound);
hr = SafeArrayGetVartype(V_ARRAY(&value), &vartype);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(vartype == VT_VARIANT, "got %d\n", vartype);
bound = 0;
hr = SafeArrayGetElement(V_ARRAY(&value), &bound, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(V_VT(&v) == VT_BSTR, "got %d\n", V_VT(&v));
ok(!lstrcmpW(V_BSTR(&v), L"foo"), "got %s\n", wine_dbgstr_w(V_BSTR(&v)));
CHECK_BSTR_LENGTH(V_BSTR(&v));
@@ -530,7 +527,7 @@ static void test_registry(void)
name = SysAllocString(L"HKEY_CURRENT_USER\\Software\\Wine\\Test\\regsz1");
V_VT(&value) = VT_I2;
hr = IWshShell3_RegRead(sh3, name, &value);
- ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got 0x%08x\n", hr);
+ ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "Unexpected hr %#lx.\n", hr);
ok(V_VT(&value) == VT_I2, "got %d\n", V_VT(&value));
VariantClear(&value);
SysFreeString(name);
@@ -539,76 +536,76 @@ static void test_registry(void)
/* RegWrite() */
ret = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", &root);
- ok(ret == 0, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
hr = IWshShell3_RegWrite(sh3, NULL, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
lstrcpyW(pathW, keypathW);
lstrcatW(pathW, regszW);
name = SysAllocString(pathW);
hr = IWshShell3_RegWrite(sh3, name, NULL, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
VariantInit(&value);
hr = IWshShell3_RegWrite(sh3, name, &value, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IWshShell3_RegWrite(sh3, name, &value, &value);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* type is optional */
V_VT(&v) = VT_ERROR;
V_ERROR(&v) = DISP_E_PARAMNOTFOUND;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* default type is REG_SZ */
V_VT(&value) = VT_I4;
V_I4(&value) = 12;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_BSTR;
V_BSTR(&value) = SysAllocString(regszW);
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_R4;
V_R4(&value) = 1.2;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
type = REG_NONE;
ret = RegQueryValueExA(root, "regsz", 0, &type, NULL, NULL);
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
- ok(type == REG_SZ, "got %d\n", type);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
+ ok(type == REG_SZ, "Unexpected type %ld.\n", type);
ret = RegDeleteValueA(root, "regsz");
- ok(ret == ERROR_SUCCESS, "got %d\n", ret);
+ ok(!ret, "Unexpected retval %ld.\n", ret);
V_VT(&value) = VT_R4;
V_R4(&value) = 1.2;
V_VT(&v) = VT_I2;
V_I2(&v) = 1;
hr = IWshShell3_RegWrite(sh3, name, &value, &v);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
VariantClear(&value);
SysFreeString(name);
@@ -627,17 +624,17 @@ static void test_popup(void)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER,
&IID_IWshShell, (void **)&sh);
- ok(hr == S_OK, "Failed to create WshShell object, hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
button = 123;
text = SysAllocString(L"Text");
hr = IWshShell_Popup(sh, NULL, NULL, NULL, NULL, &button);
- ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(button == 123, "Unexpected button id %d.\n", button);
hr = IWshShell_Popup(sh, text, NULL, NULL, NULL, &button);
- ok(hr == E_POINTER, "Unexpected retval %#x.\n", hr);
+ ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
ok(button == 123, "Unexpected button id %d.\n", button);
V_VT(&optional) = VT_ERROR;
@@ -653,11 +650,11 @@ static void test_popup(void)
V_BSTR(&title) = NULL;
hr = IWshShell_Popup(sh, text, &timeout, &optional, &type, &button);
- ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(button == -1, "Unexpected button id %d.\n", button);
hr = IWshShell_Popup(sh, text, &timeout, &title, &optional, &button);
- ok(hr == S_OK, "Unexpected retval %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(button == -1, "Unexpected button id %d.\n", button);
SysFreeString(text);
@@ -673,8 +670,9 @@ START_TEST(wshom)
hr = CoCreateInstance(&CLSID_WshShell, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
&IID_IUnknown, (void**)&unk);
- if (FAILED(hr)) {
- win_skip("Could not create WshShell object: %08x\n", hr);
+ if (FAILED(hr))
+ {
+ win_skip("Could not create WshShell object: %#lx.\n", hr);
return;
}
IUnknown_Release(unk);
--
2.34.1
1
0
11 Feb '22
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/xaudio2_7/tests/Makefile.in | 1 -
dlls/xaudio2_7/tests/xaudio2.c | 182 +++++++++++++++----------------
2 files changed, 91 insertions(+), 92 deletions(-)
diff --git a/dlls/xaudio2_7/tests/Makefile.in b/dlls/xaudio2_7/tests/Makefile.in
index e44130a1d7a..ba56d94a1f3 100644
--- a/dlls/xaudio2_7/tests/Makefile.in
+++ b/dlls/xaudio2_7/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = xaudio2_7.dll
IMPORTS = ole32
diff --git a/dlls/xaudio2_7/tests/xaudio2.c b/dlls/xaudio2_7/tests/xaudio2.c
index 9821553166e..9d50944b8d3 100644
--- a/dlls/xaudio2_7/tests/xaudio2.c
+++ b/dlls/xaudio2_7/tests/xaudio2.c
@@ -192,18 +192,18 @@ static void test_simple_streaming(IXAudio2 *xa)
* XA2.7 does all mixing from a single thread, so call sequence can be
* tested. */
XA2CALL(RegisterForCallbacks, &ecb);
- ok(hr == S_OK, "RegisterForCallbacks failed: %08x\n", hr);
+ ok(hr == S_OK, "RegisterForCallbacks failed: %08lx\n", hr);
if(xaudio27)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
if(!xaudio27){
chmask = 0xdeadbeef;
IXAudio2MasteringVoice_GetChannelMask(master, &chmask);
- ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%x\n", chmask);
+ ok(chmask == (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT), "Got unexpected channel mask: 0x%lx\n", chmask);
}
/* create first source voice */
@@ -216,7 +216,7 @@ static void test_simple_streaming(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb1, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -239,14 +239,14 @@ static void test_simple_streaming(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
/* create second source voice */
XA2CALL(CreateSourceVoice, &src2, &fmt, 0, 1.f, &vcb2, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -269,13 +269,13 @@ static void test_simple_streaming(IXAudio2 *xa)
fill_buf((float*)buf2.pAudioData, &fmt, 220, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src2, &buf2, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src2, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* hook up volume meter */
if(xaudio27){
@@ -283,20 +283,20 @@ static void test_simple_streaming(IXAudio2 *xa)
hr = CoCreateInstance(&CLSID_AudioVolumeMeter27, NULL,
CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&vumeter);
- ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08x\n", hr);
+ ok(hr == S_OK, "CoCreateInstance(AudioVolumeMeter) failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
}else{
IXAPO *xapo;
hr = pCreateAudioVolumeMeter(&vumeter);
- ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr);
hr = IUnknown_QueryInterface(vumeter, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
}
@@ -309,7 +309,7 @@ static void test_simple_streaming(IXAudio2 *xa)
chain.pEffectDescriptors = &effect;
hr = IXAudio2MasteringVoice_SetEffectChain(master, &chain);
- ok(hr == S_OK, "SetEffectchain failed: %08x\n", hr);
+ ok(hr == S_OK, "SetEffectchain failed: %08lx\n", hr);
IUnknown_Release(vumeter);
@@ -488,7 +488,7 @@ static void test_buffer_callbacks(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
/* test OnBufferStart/End callbacks */
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
@@ -500,7 +500,7 @@ static void test_buffer_callbacks(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &vcb_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
buf.AudioBytes = 4410 * fmt.nBlockAlign;
@@ -514,22 +514,22 @@ static void test_buffer_callbacks(IXAudio2 *xa)
buf.pContext = &testdata[i];
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
}
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
if(xaudio27){
hr = IXAudio27SourceVoice_SetSourceSampleRate((IXAudio27SourceVoice*)src, 48000);
- ok(hr == S_OK, "SetSourceSampleRate failed: %08x\n", hr);
+ ok(hr == S_OK, "SetSourceSampleRate failed: %08lx\n", hr);
}else{
hr = IXAudio2SourceVoice_SetSourceSampleRate(src, 48000);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetSourceSampleRate should have failed: %08lx\n", hr);
}
while(1){
@@ -552,15 +552,15 @@ static void test_buffer_callbacks(IXAudio2 *xa)
/* test OnStreamEnd callback */
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
buf.Flags = XAUDIO2_END_OF_STREAM;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
timeout = 0;
while(nstreamends == 0 && timeout < 1000){
@@ -596,7 +596,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples)
nloopends = 0;
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
while(1){
if(xaudio27)
@@ -615,7 +615,7 @@ static UINT32 play_to_completion(IXAudio2SourceVoice *src, UINT32 max_samples)
}
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
return state.SamplesPlayed;
}
@@ -635,7 +635,7 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
@@ -647,7 +647,7 @@ static void test_looping(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, &loop_buf, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
@@ -656,7 +656,7 @@ static void test_looping(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 44100);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
/* play from middle to end */
buf.PlayBegin = 22050;
@@ -666,7 +666,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total);
@@ -681,7 +681,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 0;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410, "Got wrong samples played: %u\n", played - running_total);
@@ -696,7 +696,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 44100 + 4410, "Got wrong samples played: %u\n", played - running_total);
@@ -711,7 +711,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050 + 44100, "Got wrong samples played: %u\n", played - running_total);
@@ -726,7 +726,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410 + (22050 + 4410), "Got wrong samples played: %u\n", played - running_total);
@@ -743,14 +743,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
if(xaudio27){
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 4410 + (22050 + 4410 * 2), "Got wrong samples played: %u\n", played - running_total);
running_total = played;
ok(nloopends == 1, "Got wrong OnLoopEnd calls: %u\n", nloopends);
}else
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopEnd must be within play range
* xaudio27: plays only play range */
@@ -762,14 +762,14 @@ static void test_looping(IXAudio2 *xa)
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
if(xaudio27){
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, -1);
ok(played - running_total == 22050, "Got wrong samples played: %u\n", played - running_total);
running_total = played;
ok(nloopends == 0, "Got wrong OnLoopEnd calls: %u\n", nloopends);
}else
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
/* invalid: LoopBegin must be before PlayEnd
* xaudio27: crashes */
@@ -781,7 +781,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 1;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SubmitSourceBuffer should have failed: %08lx\n", hr);
}
/* infinite looping buffer */
@@ -792,7 +792,7 @@ static void test_looping(IXAudio2 *xa)
buf.LoopCount = 255;
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
played = play_to_completion(src, running_total + 88200);
ok(played - running_total == 22050 + 44100 * 2, "Got wrong samples played: %u\n", played - running_total);
@@ -819,10 +819,10 @@ static void test_submix(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
XA2CALL(CreateSubmixVoice, &sub, 2, 44100, 0, 0, NULL, NULL);
- ok(hr == S_OK, "CreateSubmixVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSubmixVoice failed: %08lx\n", hr);
if(xaudio27){
XAUDIO27_VOICE_DETAILS details;
@@ -858,7 +858,7 @@ static void test_flush(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 2, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 2, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
fmt.nChannels = 2;
@@ -869,7 +869,7 @@ static void test_flush(IXAudio2 *xa)
fmt.cbSize = 0;
XA2CALL(CreateSourceVoice, &src, &fmt, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
memset(&buf, 0, sizeof(buf));
buf.AudioBytes = 22050 * fmt.nBlockAlign;
@@ -877,13 +877,13 @@ static void test_flush(IXAudio2 *xa)
fill_buf((float*)buf.pAudioData, &fmt, 440, 22050);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
XA2CALL_0(StartEngine);
- ok(hr == S_OK, "StartEngine failed: %08x\n", hr);
+ ok(hr == S_OK, "StartEngine failed: %08lx\n", hr);
while(1){
if(xaudio27)
@@ -896,18 +896,18 @@ static void test_flush(IXAudio2 *xa)
}
hr = IXAudio2SourceVoice_Stop(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Stop failed: %08x\n", hr);
+ ok(hr == S_OK, "Stop failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_FlushSourceBuffers(src);
- ok(hr == S_OK, "FlushSourceBuffers failed: %08x\n", hr);
+ ok(hr == S_OK, "FlushSourceBuffers failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_Start(src, 0, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "Start failed: %08x\n", hr);
+ ok(hr == S_OK, "Start failed: %08lx\n", hr);
Sleep(100);
hr = IXAudio2SourceVoice_SubmitSourceBuffer(src, &buf, NULL);
- ok(hr == S_OK, "SubmitSourceBuffer failed: %08x\n", hr);
+ ok(hr == S_OK, "SubmitSourceBuffer failed: %08lx\n", hr);
if(xaudio27){
IXAudio27SourceVoice_DestroyVoice((IXAudio27SourceVoice*)src);
@@ -926,14 +926,14 @@ static UINT32 test_DeviceDetails(IXAudio27 *xa)
UINT32 count, i;
hr = IXAudio27_GetDeviceCount(xa, &count);
- ok(hr == S_OK, "GetDeviceCount failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDeviceCount failed: %08lx\n", hr);
if(count == 0)
return 0;
for(i = 0; i < count; ++i){
hr = IXAudio27_GetDeviceDetails(xa, i, &dd);
- ok(hr == S_OK, "GetDeviceDetails failed: %08x\n", hr);
+ ok(hr == S_OK, "GetDeviceDetails failed: %08lx\n", hr);
if(i == 0)
ok(dd.Role == GlobalDefaultDevice, "Got wrong role for index 0: 0x%x\n", dd.Role);
@@ -1008,46 +1008,46 @@ static void test_xapo_creation_legacy(const char *module, unsigned int version)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
hr = pCreateFX(const_clsids[i], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&fx_unk);
- ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr);
if(SUCCEEDED(hr))
IUnknown_Release(fx_unk);
}
hr = pCreateFX(avm_clsids[version - 20], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(avm_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "AudioVolumeMeter via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = pCreateFX(ar_clsids[version - 20], &fx_unk);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(ar_clsids[version - 20]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO27, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO27 interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "AudioReverb via CreateFX should have been released, got refcount: %lu\n", rc);
}
FreeLibrary(xapofxdll);
@@ -1093,65 +1093,65 @@ static void test_xapo_creation_modern(const char *module)
for(i = 0; i < ARRAY_SIZE(const_clsids); ++i){
hr = pCreateFX(const_clsids[i], &fx_unk, NULL, 0);
- ok(hr == S_OK, "%s: CreateFX(%s) failed: %08x\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
+ ok(hr == S_OK, "%s: CreateFX(%s) failed: %08lx\n", module, wine_dbgstr_guid(const_clsids[i]), hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateFX should have been released, got refcount: %lu\n", rc);
}
hr = CoCreateInstance(const_clsids[i], NULL, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&fx_unk);
- ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08x\n", hr);
+ ok(hr == REGDB_E_CLASSNOTREG, "CoCreateInstance should have failed: %08lx\n", hr);
if(SUCCEEDED(hr))
IUnknown_Release(fx_unk);
}
/* test legacy CLSID */
hr = pCreateFX(&CLSID_AudioVolumeMeter27, &fx_unk, NULL, 0);
- ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08x\n", module, hr);
+ ok(hr == S_OK, "%s: CreateFX(CLSID_AudioVolumeMeter) failed: %08lx\n", module, hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via legacy CreateFX should have been released, got refcount: %lu\n", rc);
}
pCAVM = (void*)GetProcAddress(xaudio2dll, "CreateAudioVolumeMeter");
ok(pCAVM != NULL, "%s did not have CreateAudioVolumeMeter?\n", module);
hr = pCAVM(&fx_unk);
- ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioVolumeMeter failed: %08lx\n", hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateAudioVolumeMeter should have been released, got refcount: %lu\n", rc);
}
pCAR = (void*)GetProcAddress(xaudio2dll, "CreateAudioReverb");
ok(pCAR != NULL, "%s did not have CreateAudioReverb?\n", module);
hr = pCAR(&fx_unk);
- ok(hr == S_OK, "CreateAudioReverb failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateAudioReverb failed: %08lx\n", hr);
if(SUCCEEDED(hr)){
IXAPO *xapo;
hr = IUnknown_QueryInterface(fx_unk, &IID_IXAPO, (void**)&xapo);
- ok(hr == S_OK, "Couldn't get IXAPO interface: %08x\n", hr);
+ ok(hr == S_OK, "Couldn't get IXAPO interface: %08lx\n", hr);
if(SUCCEEDED(hr))
IXAPO_Release(xapo);
rc = IUnknown_Release(fx_unk);
- ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %u\n", rc);
+ ok(rc == 0, "XAPO via CreateAudioReverb should have been released, got refcount: %lu\n", rc);
}
FreeLibrary(xaudio2dll);
@@ -1180,7 +1180,7 @@ static void test_setchannelvolumes(IXAudio2 *xa)
hr = IXAudio27_CreateMasteringVoice((IXAudio27*)xa, &master, 8, 44100, 0, 0, NULL);
else
hr = IXAudio2_CreateMasteringVoice(xa, &master, 8, 44100, 0, NULL, NULL, AudioCategory_GameEffects);
- ok(hr == S_OK, "CreateMasteringVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateMasteringVoice failed: %08lx\n", hr);
fmt_2ch.wFormatTag = WAVE_FORMAT_IEEE_FLOAT;
fmt_2ch.nChannels = 2;
@@ -1199,32 +1199,32 @@ static void test_setchannelvolumes(IXAudio2 *xa)
fmt_8ch.cbSize = 0;
XA2CALL(CreateSourceVoice, &src_2ch, &fmt_2ch, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
XA2CALL(CreateSourceVoice, &src_8ch, &fmt_8ch, 0, 1.f, NULL, NULL, NULL);
- ok(hr == S_OK, "CreateSourceVoice failed: %08x\n", hr);
+ ok(hr == S_OK, "CreateSourceVoice failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 8, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
if(xaudio27){
/* XAudio 2.7 doesn't check the number of channels */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == S_OK, "SetChannelVolumes failed: %08x\n", hr);
+ ok(hr == S_OK, "SetChannelVolumes failed: %08lx\n", hr);
}else{
/* the number of channels must be the same as the number of channels on the source voice */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_8ch, 2, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 8, volumes, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
/* volumes must not be NULL, XAudio 2.7 doesn't check this */
hr = IXAudio2SourceVoice_SetChannelVolumes(src_2ch, 2, NULL, XAUDIO2_COMMIT_NOW);
- ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08x\n", hr);
+ ok(hr == XAUDIO2_E_INVALID_CALL, "SetChannelVolumes should have failed: %08lx\n", hr);
}
if(xaudio27){
@@ -1281,7 +1281,7 @@ START_TEST(xaudio2)
ok(hr != S_OK, "QueryInterface with IID_IXAudio28 on IXAudio27 object returned success. Expected to fail\n");
hr = IXAudio27_Initialize(xa27, 0, XAUDIO2_ANY_PROCESSOR);
- ok(hr == S_OK, "Initialize failed: %08x\n", hr);
+ ok(hr == S_OK, "Initialize failed: %08lx\n", hr);
has_devices = test_DeviceDetails(xa27);
if(has_devices){
@@ -1295,7 +1295,7 @@ START_TEST(xaudio2)
skip("No audio devices available\n");
rc = IXAudio27_Release(xa27);
- ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %u\n", rc);
+ ok(rc == 0, "IXAudio2.7 object should have been released, got refcount %lu\n", rc);
}else
win_skip("XAudio 2.7 not available\n");
@@ -1304,10 +1304,10 @@ START_TEST(xaudio2)
xaudio27 = FALSE;
hr = pXAudio2Create(&xa, 0, XAUDIO2_DEFAULT_PROCESSOR);
- ok(hr == S_OK, "XAudio2Create failed: %08x\n", hr);
+ ok(hr == S_OK, "XAudio2Create failed: %08lx\n", hr);
hr = IXAudio2_QueryInterface(xa, &IID_IXAudio27, (void**)&xa27);
- ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "XA28 object should support IXAudio27, gave: %08lx\n", hr);
has_devices = check_has_devices(xa);
if(has_devices){
@@ -1321,7 +1321,7 @@ START_TEST(xaudio2)
skip("No audio devices available\n");
rc = IXAudio2_Release(xa);
- ok(rc == 0, "IXAudio2 object should have been released, got refcount %u\n", rc);
+ ok(rc == 0, "IXAudio2 object should have been released, got refcount %lu\n", rc);
}else
win_skip("XAudio 2.8 not available\n");
--
2.34.1
1
0
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
---
dlls/wow64/Makefile.in | 1 -
dlls/wow64/process.c | 6 +++---
dlls/wow64/registry.c | 2 +-
dlls/wow64/security.c | 4 ++--
dlls/wow64/sync.c | 2 +-
dlls/wow64/syscall.c | 10 +++++-----
dlls/wow64/system.c | 2 +-
dlls/wow64/virtual.c | 4 ++--
8 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/dlls/wow64/Makefile.in b/dlls/wow64/Makefile.in
index 6b161b5cc3e..eebf9e8e53a 100644
--- a/dlls/wow64/Makefile.in
+++ b/dlls/wow64/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = wow64.dll
IMPORTLIB = wow64
IMPORTS = ntdll winecrt0
diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c
index 52f6b952031..82ca4181116 100644
--- a/dlls/wow64/process.c
+++ b/dlls/wow64/process.c
@@ -365,7 +365,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
ctx.EFlags &= ~(0x100|0x400|0x40000);
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x eip %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx eip %08lx\n",
rec->ExceptionCode, ctx.Eip, ctx.Esp, stack->context.Eip );
}
break;
@@ -392,7 +392,7 @@ static void call_user_exception_dispatcher( EXCEPTION_RECORD32 *rec, void *ctx32
else ctx.Cpsr &= ~0x20;
NtSetInformationThread( GetCurrentThread(), ThreadWow64Context, &ctx, sizeof(ctx) );
- TRACE( "exception %08x dispatcher %08x stack %08x pc %08x\n",
+ TRACE( "exception %08lx dispatcher %08lx stack %08lx pc %08lx\n",
rec->ExceptionCode, ctx.Pc, ctx.Sp, stack->context.Sp );
}
break;
@@ -516,7 +516,7 @@ NTSTATUS WINAPI wow64_NtCreateThread( UINT *args )
void *initial_teb = get_ptr( &args );
BOOLEAN suspended = get_ulong( &args );
- FIXME( "%p %x %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
+ FIXME( "%p %lx %p %p %p %p %p %u: stub\n", handle_ptr, access, attr32, process,
id32, context, initial_teb, suspended );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/registry.c b/dlls/wow64/registry.c
index e89c65c4c5e..dfb75d72bc7 100644
--- a/dlls/wow64/registry.c
+++ b/dlls/wow64/registry.c
@@ -349,7 +349,7 @@ NTSTATUS WINAPI wow64_NtQueryMultipleValueKey( UINT *args )
ULONG len = get_ulong( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %p %u %p %u %p: stub\n", handle, info, count, ptr, len, retlen );
+ FIXME( "%p %p %lu %p %lu %p: stub\n", handle, info, count, ptr, len, retlen );
return STATUS_SUCCESS;
}
diff --git a/dlls/wow64/security.c b/dlls/wow64/security.c
index 1c8f82d9a3a..680f5a6ec56 100644
--- a/dlls/wow64/security.c
+++ b/dlls/wow64/security.c
@@ -110,7 +110,7 @@ NTSTATUS WINAPI wow64_NtAdjustGroupsToken( UINT *args )
TOKEN_GROUPS32 *prev = get_ptr( &args );
ULONG *retlen = get_ptr( &args );
- FIXME( "%p %d %p %u %p %p\n", handle, reset, groups, len, prev, retlen );
+ FIXME( "%p %d %p %lu %p %p\n", handle, reset, groups, len, prev, retlen );
return STATUS_NOT_IMPLEMENTED;
}
@@ -146,7 +146,7 @@ NTSTATUS WINAPI wow64_NtCreateLowBoxToken( UINT *args )
ULONG handle_count = get_ulong( &args );
ULONG *handles32 = get_ptr( &args );
- FIXME( "%p %p %x %p %p %u %p %u %p: stub\n",
+ FIXME( "%p %p %lx %p %p %lu %p %lu %p: stub\n",
handle_ptr, token, access, attr32, sid, count, capabilities32, handle_count, handles32 );
*handle_ptr = 0;
diff --git a/dlls/wow64/sync.c b/dlls/wow64/sync.c
index b8f3fabe06c..d4122ddf3f3 100644
--- a/dlls/wow64/sync.c
+++ b/dlls/wow64/sync.c
@@ -141,7 +141,7 @@ NTSTATUS WINAPI wow64_NtAcceptConnectPort( UINT *args )
LPC_SECTION_WRITE *write = get_ptr( &args );
LPC_SECTION_READ *read = get_ptr( &args );
- FIXME( "%p %u %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
+ FIXME( "%p %lu %p %u %p %p: stub\n", handle_ptr, id, msg, accept, write, read );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c
index 42e852f4d28..7cab0894738 100644
--- a/dlls/wow64/syscall.c
+++ b/dlls/wow64/syscall.c
@@ -455,9 +455,9 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
thunks[start_pos + table_pos] = (syscall_thunk)orig_table->ServiceTable[wrap_pos++];
max_pos = max( table_pos, max_pos );
}
- else ERR( "invalid syscall id %04x for %s\n", id, name );
+ else ERR( "invalid syscall id %04lx for %s\n", id, name );
}
- else ERR( "wrong syscall table id %04x for %s\n", id, name );
+ else ERR( "wrong syscall table id %04lx for %s\n", id, name );
}
else if (res > 0)
{
@@ -465,7 +465,7 @@ static void init_syscall_table( HMODULE module, ULONG idx, const SYSTEM_SERVICE_
wrap_pos++;
exp_pos--; /* try again */
}
- else FIXME( "missing wrapper for syscall %04x %s\n", id, name );
+ else FIXME( "missing wrapper for syscall %04lx %s\n", id, name );
}
for ( ; wrap_pos < orig_table->ServiceLimit; wrap_pos++)
@@ -492,7 +492,7 @@ static HMODULE load_64bit_module( const WCHAR *name )
RtlInitUnicodeString( &str, path );
if ((status = LdrLoadDll( NULL, 0, &str, &module )))
{
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
}
return module;
@@ -535,7 +535,7 @@ static HMODULE load_32bit_module( const WCHAR *name )
if (!status) return module;
failed:
- ERR( "failed to load dll %x\n", status );
+ ERR( "failed to load dll %lx\n", status );
NtTerminateProcess( GetCurrentProcess(), status );
return NULL;
}
diff --git a/dlls/wow64/system.c b/dlls/wow64/system.c
index 092319cba84..0727bc25bbe 100644
--- a/dlls/wow64/system.c
+++ b/dlls/wow64/system.c
@@ -686,7 +686,7 @@ NTSTATUS WINAPI wow64_NtRaiseHardError( UINT *args )
HARDERROR_RESPONSE_OPTION option = get_ulong( &args );
HARDERROR_RESPONSE *response = get_ptr( &args );
- FIXME( "%08x %u %x %p %u %p: stub\n", status, count, params_mask, params, option, response );
+ FIXME( "%08lx %lu %lx %p %u %p: stub\n", status, count, params_mask, params, option, response );
return STATUS_NOT_IMPLEMENTED;
}
diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c
index f4cd50d0ea2..fc470c07923 100644
--- a/dlls/wow64/virtual.c
+++ b/dlls/wow64/virtual.c
@@ -77,7 +77,7 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemoryEx( UINT *args )
SIZE_T size;
NTSTATUS status;
- if (count) FIXME( "%d extended parameters %p\n", count, params );
+ if (count) FIXME( "%ld extended parameters %p\n", count, params );
status = NtAllocateVirtualMemoryEx( process, addr_32to64( &addr, addr32 ), size_32to64( &size, size32 ),
type, protect, params, count );
if (!status)
@@ -430,7 +430,7 @@ NTSTATUS WINAPI wow64_NtSetLdtEntries( UINT *args )
ULONG entry2_low = get_ulong( &args );
ULONG entry2_high = get_ulong( &args );
- FIXME( "%04x %08x %08x %04x %08x %08x: stub\n",
+ FIXME( "%04lx %08lx %08lx %04lx %08lx %08lx: stub\n",
sel1, entry1_low, entry1_high, sel2, entry2_low, entry2_high );
return STATUS_NOT_IMPLEMENTED;
}
--
2.34.1
1
0
[PATCH v2 1/5] shlwapi/tests: Remove workarounds from url.c for no longer supported Windows versions.
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/shlwapi/tests/url.c | 66 ++++++++++++----------------------------
1 file changed, 19 insertions(+), 47 deletions(-)
diff --git a/dlls/shlwapi/tests/url.c b/dlls/shlwapi/tests/url.c
index 703bdcd0a55..65fc2cfedd1 100644
--- a/dlls/shlwapi/tests/url.c
+++ b/dlls/shlwapi/tests/url.c
@@ -295,7 +295,6 @@ typedef struct _TEST_URL_ESCAPEW {
DWORD flags;
const WCHAR expecturl[INTERNET_MAX_URL_LENGTH];
const WCHAR win7url[INTERNET_MAX_URL_LENGTH]; /* <= Win7 */
- const WCHAR vistaurl[INTERNET_MAX_URL_LENGTH]; /* <= Vista/2k8 */
} TEST_URL_ESCAPEW;
static const TEST_URL_ESCAPEW TEST_ESCAPEW[] = {
@@ -311,12 +310,10 @@ static const TEST_URL_ESCAPEW TEST_ESCAPEW[] = {
{'M','a','%','D','F',0}},
/* 0x2070E */
{{0xd841,0xdf0e,0}, URL_ESCAPE_AS_UTF8, {'%','F','0','%','A','0','%','9','C','%','8','E',0},
- {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0},
- {0xd841,0xdf0e,0}},
+ {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0}},
/* 0x27A3E */
{{0xd85e,0xde3e,0}, URL_ESCAPE_AS_UTF8, {'%','F','0','%','A','7','%','A','8','%','B','E',0},
- {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0},
- {0xd85e,0xde3e,0}},
+ {'%','E','F','%','B','F','%','B','D','%','E','F','%','B','F','%','B','D',0}},
{{0xd85e,0}, URL_ESCAPE_AS_UTF8, {'%','E','F','%','B','F','%','B','D',0},
{0xd85e,0}},
@@ -414,12 +411,7 @@ static const struct {
{"c:\\foo/b a%r", "file:///c:/foo/b%20a%25r", S_OK},
{"c:\\foo\\foo bar", "file:///c:/foo/foo%20bar", S_OK},
{"file:///c:/foo/bar", "file:///c:/foo/bar", S_FALSE},
-#if 0
- /* The following test fails on native shlwapi as distributed with Win95/98.
- * Wine matches the behaviour of later versions.
- */
{"xx:c:\\foo\\bar", "xx:c:\\foo\\bar", S_FALSE}
-#endif
};
/* ################ */
@@ -614,8 +606,8 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
dwSize = 1;
res = UrlGetPartA(szUrl, szPart, &dwSize, dwPart, dwFlags);
ok(res == E_POINTER, "UrlGetPart for \"%s\" gave: 0x%08x\n", szUrl, res);
- ok(dwSize == strlen(szExpected)+1 ||
- (*szExpected == '?' && dwSize == strlen(szExpected)),
+ todo_wine_if (dwPart == URL_PART_QUERY)
+ ok(dwSize == strlen(szExpected) + 1,
"UrlGetPart for \"%s\" gave size: %u\n", szUrl, dwSize);
dwSize = INTERNET_MAX_URL_LENGTH;
@@ -638,9 +630,8 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
FreeWideString(wszConvertedPart);
FreeWideString(wszUrl);
- /* Note that v6.0 and later don't return '?' with the query */
- ok(strcmp(szPart,szExpected)==0 ||
- (*szExpected=='?' && !strcmp(szPart,szExpected+1)),
+ todo_wine_if (dwPart == URL_PART_QUERY)
+ ok(!strcmp(szPart,szExpected),
"Expected %s, but got %s\n", szExpected, szPart);
}
@@ -707,7 +698,7 @@ static void test_UrlGetPart(void)
test_url_part(TEST_URL_3, URL_PART_USERNAME, 0, "foo");
test_url_part(TEST_URL_3, URL_PART_PASSWORD, 0, "bar");
test_url_part(TEST_URL_3, URL_PART_SCHEME, 0, "http");
- test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "?query=x&return=y");
+ test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "query=x&return=y");
test_url_part(TEST_URL_4, URL_PART_HOSTNAME, 0, "google.*.com");
@@ -855,10 +846,8 @@ static void test_UrlEscapeA(void)
size = 1;
empty_string[0] = 127;
ret = UrlEscapeA("/woningplan/woonkamer basis.swf", empty_string, &size, URL_ESCAPE_AS_UTF8);
- ok(ret == E_NOTIMPL || broken(ret == E_POINTER), /* < Win7/Win2k8 */
- "got %x, expected %x\n", ret, E_NOTIMPL);
- ok(size == 1 || broken(size == 34), /* < Win7/Win2k8 */
- "got %d, expected %d\n", size, 1);
+ ok(ret == E_NOTIMPL, "Got unexpected hr %#x.\n", ret);
+ ok(size == 1, "Got unexpected size %u.\n", size);
ok(empty_string[0] == 127, "String has changed, empty_string[0] = %d\n", empty_string[0]);
for (i = 0; i < ARRAY_SIZE(TEST_ESCAPE); i++) {
@@ -962,12 +951,10 @@ static void test_UrlEscapeW(void)
size = INTERNET_MAX_URL_LENGTH;
ret = UrlEscapeW(TEST_ESCAPEW[i].url, ret_url, &size, TEST_ESCAPEW[i].flags);
ok(ret == S_OK, "Got unexpected hr %#x for %s.\n", ret, debugstr_w(TEST_ESCAPEW[i].url));
- ok(!lstrcmpW(ret_url, TEST_ESCAPEW[i].expecturl) ||
- broken(!lstrcmpW(ret_url, TEST_ESCAPEW[i].vistaurl)) ||
- broken(!lstrcmpW(ret_url, TEST_ESCAPEW[i].win7url)),
- "Expected \"%s\" or \"%s\" or \"%s\", but got \"%s\" for \"%s\"\n",
- wine_dbgstr_w(TEST_ESCAPEW[i].expecturl), wine_dbgstr_w(TEST_ESCAPEW[i].vistaurl),
- wine_dbgstr_w(TEST_ESCAPEW[i].win7url), wine_dbgstr_w(ret_url), wine_dbgstr_w(TEST_ESCAPEW[i].url));
+ ok(!wcscmp(ret_url, TEST_ESCAPEW[i].expecturl)
+ || broken(!wcscmp(ret_url, TEST_ESCAPEW[i].win7url)),
+ "Expected %s, but got %s for %s.\n", debugstr_w(TEST_ESCAPEW[i].expecturl),
+ debugstr_w(ret_url), debugstr_w(TEST_ESCAPEW[i].url));
}
}
@@ -1484,36 +1471,27 @@ static void test_HashData(void)
/* Test hashing with identically sized input/output buffers. */
res = HashData(input, 16, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected, sizeof(expected)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected, sizeof(expected)), "data didn't match\n");
/* Test hashing with larger output buffer. */
res = HashData(input, 16, output, 32);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected2, sizeof(expected2)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected2, sizeof(expected2)), "data didn't match\n");
/* Test hashing with smaller input buffer. */
res = HashData(input, 8, output, 16);
ok(res == S_OK, "Expected HashData to return S_OK, got 0x%08x\n", res);
- if(res == S_OK)
- ok(!memcmp(output, expected3, sizeof(expected3)),
- "Output buffer did not match expected contents\n");
+ ok(!memcmp(output, expected3, sizeof(expected3)), "data didn't match\n");
/* Test passing NULL pointers for input/output parameters. */
res = HashData(NULL, 0, NULL, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
res = HashData(input, 0, NULL, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
res = HashData(NULL, 0, output, 0);
- ok(res == E_INVALIDARG || broken(res == S_OK), /* Windows 2000 */
- "Expected HashData to return E_INVALIDARG, got 0x%08x\n", res);
+ ok(res == E_INVALIDARG, "Got unexpected hr %#x.\n", res);
/* Test passing valid pointers with sizes of zero. */
for (i = 0; i < ARRAY_SIZE(input); i++)
@@ -1527,16 +1505,10 @@ static void test_HashData(void)
/* The buffers should be unchanged. */
for (i = 0; i < ARRAY_SIZE(input); i++)
- {
ok(input[i] == 0x00, "Expected the input buffer to be unchanged\n");
- if(input[i] != 0x00) break;
- }
for (i = 0; i < ARRAY_SIZE(output); i++)
- {
ok(output[i] == 0xFF, "Expected the output buffer to be unchanged\n");
- if(output[i] != 0xFF) break;
- }
/* Input/output parameters are not validated. */
res = HashData((BYTE *)0xdeadbeef, 0, (BYTE *)0xdeadbeef, 0);
--
2.34.1
1
4
[PATCH v2 1/5] ws2_32/tests: Use winetest_push_context() in test_WSAStringToAddress().
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ws2_32/tests/protocol.c | 86 ++++++++++++++----------------------
1 file changed, 33 insertions(+), 53 deletions(-)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 1ff335f7fe2..d902d399c00 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -1403,12 +1403,11 @@ static void test_WSAStringToAddress(void)
{ "", { 0, 0, 0, 0, 0, 0, 0, 0 }, 0, WSAEINVAL },
};
+ int len, ret, expected_len;
WCHAR inputW[64];
- INT len, ret, expected_len, expected_ret;
- short expected_family;
SOCKADDR_IN sockaddr;
SOCKADDR_IN6 sockaddr6;
- int i, j;
+ unsigned int i, j;
len = 0;
WSASetLastError( 0 );
@@ -1420,12 +1419,16 @@ static void test_WSAStringToAddress(void)
for (i = 0; i < 2; i++)
{
+ winetest_push_context( i ? "unicode" : "ascii" );
+
for (j = 0; j < ARRAY_SIZE(ipv4_tests); j++)
{
len = sizeof(sockaddr) + 10;
expected_len = ipv4_tests[j].error ? len : sizeof(sockaddr);
memset( &sockaddr, 0xab, sizeof(sockaddr) );
+ winetest_push_context( "addr %s", debugstr_a(ipv4_tests[j].input) );
+
WSASetLastError( 0 );
if (i == 0)
{
@@ -1436,26 +1439,16 @@ static void test_WSAStringToAddress(void)
MultiByteToWideChar( CP_ACP, 0, ipv4_tests[j].input, -1, inputW, ARRAY_SIZE(inputW) );
ret = WSAStringToAddressW( inputW, AF_INET, NULL, (SOCKADDR *)&sockaddr, &len );
}
- expected_ret = ipv4_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv4_tests[j].error ? 0 : AF_INET;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv4_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), WSAGetLastError(), ipv4_tests[j].error );
- ok( sockaddr.sin_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_family, expected_family );
+ ok( ret == (ipv4_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv4_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr.sin_family == (ipv4_tests[j].error ? 0 : AF_INET),
+ "got family %#x\n", sockaddr.sin_family );
ok( sockaddr.sin_addr.s_addr == htonl( ipv4_tests[j].address ),
- "WSAStringToAddress(%s) gave address %08x, expected %08x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_addr.s_addr, htonl( ipv4_tests[j].address) );
- ok( sockaddr.sin_port == htons( ipv4_tests[j].port ),
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_port, htons( ipv4_tests[j].port ) );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), len, expected_len );
+ "got addr %08x\n", sockaddr.sin_addr.s_addr );
+ ok( sockaddr.sin_port == htons( ipv4_tests[j].port ), "got port %u\n", sockaddr.sin_port );
+ ok( len == expected_len, "got len %d\n", len );
+
+ winetest_pop_context();
}
for (j = 0; j < ARRAY_SIZE(ipv6_tests); j++)
@@ -1479,41 +1472,28 @@ static void test_WSAStringToAddress(void)
win_skip("IPv6 not supported\n");
break;
}
- expected_ret = ipv6_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv6_tests[j].error ? 0 : AF_INET6;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv6_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
- ok( sockaddr6.sin6_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_family, expected_family );
- ok( memcmp(&sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr)) == 0,
- "WSAStringToAddress(%s) gave address %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
- wine_dbgstr_a( ipv6_tests[j].input ),
+
+ winetest_push_context( "addr %s", debugstr_a(ipv6_tests[j].input) );
+
+ ok( ret == (ipv6_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv6_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr6.sin6_family == (ipv6_tests[j].error ? 0 : AF_INET6),
+ "got family %#x\n", sockaddr6.sin6_family );
+ ok( !memcmp( &sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr) ),
+ "got addr %x:%x:%x:%x:%x:%x:%x:%x\n",
sockaddr6.sin6_addr.s6_words[0], sockaddr6.sin6_addr.s6_words[1],
sockaddr6.sin6_addr.s6_words[2], sockaddr6.sin6_addr.s6_words[3],
sockaddr6.sin6_addr.s6_words[4], sockaddr6.sin6_addr.s6_words[5],
- sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7],
- ipv6_tests[j].address[0], ipv6_tests[j].address[1],
- ipv6_tests[j].address[2], ipv6_tests[j].address[3],
- ipv6_tests[j].address[4], ipv6_tests[j].address[5],
- ipv6_tests[j].address[6], ipv6_tests[j].address[7] );
- ok( sockaddr6.sin6_scope_id == 0,
- "WSAStringToAddress(%s) gave scope %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_scope_id );
- ok( sockaddr6.sin6_port == ipv6_tests[j].port,
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_port, ipv6_tests[j].port );
- ok( sockaddr6.sin6_flowinfo == 0,
- "WSAStringToAddress(%s) gave flowinfo %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_flowinfo );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), len, expected_len );
+ sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7] );
+ ok( !sockaddr6.sin6_scope_id, "got scope id %u\n", sockaddr6.sin6_scope_id );
+ ok( sockaddr6.sin6_port == ipv6_tests[j].port, "got port %u\n", sockaddr6.sin6_port );
+ ok( !sockaddr6.sin6_flowinfo, "got flowinfo %u\n", sockaddr6.sin6_flowinfo );
+ ok( len == expected_len, "got len %d\n", len );
+
+ winetest_pop_context();
}
+
+ winetest_pop_context();
}
}
--
2.34.1
2
5
[PATCH 1/5] ws2_32/tests: Use winetest_push_context() in test_WSAStringToAddress().
by Zebediah Figura 11 Feb '22
by Zebediah Figura 11 Feb '22
11 Feb '22
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
---
dlls/ws2_32/tests/protocol.c | 88 ++++++++++++++----------------------
1 file changed, 33 insertions(+), 55 deletions(-)
diff --git a/dlls/ws2_32/tests/protocol.c b/dlls/ws2_32/tests/protocol.c
index 1ff335f7fe2..81b2067d704 100644
--- a/dlls/ws2_32/tests/protocol.c
+++ b/dlls/ws2_32/tests/protocol.c
@@ -1404,11 +1404,10 @@ static void test_WSAStringToAddress(void)
};
WCHAR inputW[64];
- INT len, ret, expected_len, expected_ret;
- short expected_family;
SOCKADDR_IN sockaddr;
SOCKADDR_IN6 sockaddr6;
- int i, j;
+ unsigned int i, j;
+ int len, ret;
len = 0;
WSASetLastError( 0 );
@@ -1420,12 +1419,15 @@ static void test_WSAStringToAddress(void)
for (i = 0; i < 2; i++)
{
+ winetest_push_context( i ? "unicode" : "ascii" );
+
for (j = 0; j < ARRAY_SIZE(ipv4_tests); j++)
{
len = sizeof(sockaddr) + 10;
- expected_len = ipv4_tests[j].error ? len : sizeof(sockaddr);
memset( &sockaddr, 0xab, sizeof(sockaddr) );
+ winetest_push_context( "addr %s", debugstr_a(ipv4_tests[j].input) );
+
WSASetLastError( 0 );
if (i == 0)
{
@@ -1436,32 +1438,21 @@ static void test_WSAStringToAddress(void)
MultiByteToWideChar( CP_ACP, 0, ipv4_tests[j].input, -1, inputW, ARRAY_SIZE(inputW) );
ret = WSAStringToAddressW( inputW, AF_INET, NULL, (SOCKADDR *)&sockaddr, &len );
}
- expected_ret = ipv4_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv4_tests[j].error ? 0 : AF_INET;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv4_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), WSAGetLastError(), ipv4_tests[j].error );
- ok( sockaddr.sin_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_family, expected_family );
+ ok( ret == (ipv4_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv4_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr.sin_family == (ipv4_tests[j].error ? 0 : AF_INET),
+ "got family %#x\n", sockaddr.sin_family );
ok( sockaddr.sin_addr.s_addr == htonl( ipv4_tests[j].address ),
- "WSAStringToAddress(%s) gave address %08x, expected %08x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_addr.s_addr, htonl( ipv4_tests[j].address) );
- ok( sockaddr.sin_port == htons( ipv4_tests[j].port ),
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr.sin_port, htons( ipv4_tests[j].port ) );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), len, expected_len );
+ "got addr %08x\n", sockaddr.sin_addr.s_addr );
+ ok( sockaddr.sin_port == htons( ipv4_tests[j].port ), "got port %u\n", sockaddr.sin_port );
+ ok( len == (ipv4_tests[j].error ? len : sizeof(sockaddr)), "got len %d\n", len );
+
+ winetest_pop_context();
}
for (j = 0; j < ARRAY_SIZE(ipv6_tests); j++)
{
len = sizeof(sockaddr6) + 10;
- expected_len = ipv6_tests[j].error ? len : sizeof(sockaddr6);
memset( &sockaddr6, 0xab, sizeof(sockaddr6) );
WSASetLastError( 0 );
@@ -1479,41 +1470,28 @@ static void test_WSAStringToAddress(void)
win_skip("IPv6 not supported\n");
break;
}
- expected_ret = ipv6_tests[j].error ? SOCKET_ERROR : 0;
- expected_family = ipv6_tests[j].error ? 0 : AF_INET6;
- ok( ret == expected_ret,
- "WSAStringToAddress(%s) returned %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), ret, expected_ret );
- ok( WSAGetLastError() == ipv6_tests[j].error,
- "WSAStringToAddress(%s) gave error %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), WSAGetLastError(), ipv6_tests[j].error );
- ok( sockaddr6.sin6_family == expected_family,
- "WSAStringToAddress(%s) gave family %d, expected %d\n",
- wine_dbgstr_a( ipv4_tests[j].input ), sockaddr6.sin6_family, expected_family );
- ok( memcmp(&sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr)) == 0,
- "WSAStringToAddress(%s) gave address %x:%x:%x:%x:%x:%x:%x:%x, expected %x:%x:%x:%x:%x:%x:%x:%x\n",
- wine_dbgstr_a( ipv6_tests[j].input ),
+
+ winetest_push_context( "addr %s", debugstr_a(ipv6_tests[j].input) );
+
+ ok( ret == (ipv6_tests[j].error ? SOCKET_ERROR : 0), "got %d\n", ret );
+ ok( WSAGetLastError() == ipv6_tests[j].error, "got error %d\n", WSAGetLastError() );
+ ok( sockaddr6.sin6_family == (ipv6_tests[j].error ? 0 : AF_INET6),
+ "got family %#x\n", sockaddr6.sin6_family );
+ ok( !memcmp( &sockaddr6.sin6_addr, ipv6_tests[j].address, sizeof(sockaddr6.sin6_addr) ),
+ "got addr %x:%x:%x:%x:%x:%x:%x:%x\n",
sockaddr6.sin6_addr.s6_words[0], sockaddr6.sin6_addr.s6_words[1],
sockaddr6.sin6_addr.s6_words[2], sockaddr6.sin6_addr.s6_words[3],
sockaddr6.sin6_addr.s6_words[4], sockaddr6.sin6_addr.s6_words[5],
- sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7],
- ipv6_tests[j].address[0], ipv6_tests[j].address[1],
- ipv6_tests[j].address[2], ipv6_tests[j].address[3],
- ipv6_tests[j].address[4], ipv6_tests[j].address[5],
- ipv6_tests[j].address[6], ipv6_tests[j].address[7] );
- ok( sockaddr6.sin6_scope_id == 0,
- "WSAStringToAddress(%s) gave scope %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_scope_id );
- ok( sockaddr6.sin6_port == ipv6_tests[j].port,
- "WSAStringToAddress(%s) gave port %04x, expected %04x\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_port, ipv6_tests[j].port );
- ok( sockaddr6.sin6_flowinfo == 0,
- "WSAStringToAddress(%s) gave flowinfo %d, expected 0\n",
- wine_dbgstr_a( ipv6_tests[j].input ), sockaddr6.sin6_flowinfo );
- ok( len == expected_len,
- "WSAStringToAddress(%s) gave length %d, expected %d\n",
- wine_dbgstr_a( ipv6_tests[j].input ), len, expected_len );
+ sockaddr6.sin6_addr.s6_words[6], sockaddr6.sin6_addr.s6_words[7] );
+ ok( !sockaddr6.sin6_scope_id, "got scope id %u\n", sockaddr6.sin6_scope_id );
+ ok( sockaddr6.sin6_port == ipv6_tests[j].port, "got port %u\n", sockaddr6.sin6_port );
+ ok( !sockaddr6.sin6_flowinfo, "got flowinfo %u\n", sockaddr6.sin6_flowinfo );
+ ok( len == (ipv6_tests[j].error ? len : sizeof(sockaddr)), "got len %d\n", len );
+
+ winetest_pop_context();
}
+
+ winetest_pop_context();
}
}
--
2.34.1
2
8
11 Feb '22
Needed for native mfc42u.dll.
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
v7: Rebase.
---
configure.ac | 1 +
.../Makefile.in | 1 +
.../api-ms-win-core-privateprofile-l1-1-0.spec | 14 ++++++++++++++
3 files changed, 16 insertions(+)
create mode 100644 dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
diff --git a/configure.ac b/configure.ac
index e51e114c45e..f018256bd22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2416,6 +2416,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-namedpipe-l1-2-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-namespace-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-normalization-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-path-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-privateprofile-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-privateprofile-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-processenvironment-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-core-processenvironment-l1-2-0)
diff --git a/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in b/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
new file mode 100644
index 00000000000..c8b8ef84aef
--- /dev/null
+++ b/dlls/api-ms-win-core-privateprofile-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-core-privateprofile-l1-1-0.dll
diff --git a/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec b/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
new file mode 100644
index 00000000000..c8153c3a296
--- /dev/null
+++ b/dlls/api-ms-win-core-privateprofile-l1-1-0/api-ms-win-core-privateprofile-l1-1-0.spec
@@ -0,0 +1,14 @@
+@ stdcall GetPrivateProfileIntA(str str long str) kernel32.GetPrivateProfileIntA
+@ stdcall GetPrivateProfileIntW(wstr wstr long wstr) kernel32.GetPrivateProfileIntW
+@ stdcall GetPrivateProfileSectionW(wstr ptr long wstr) kernel32.GetPrivateProfileSectionW
+@ stdcall GetPrivateProfileStringA(str str str ptr long str) kernel32.GetPrivateProfileStringA
+@ stdcall GetPrivateProfileStringW(wstr wstr wstr ptr long wstr) kernel32.GetPrivateProfileStringW
+@ stdcall GetProfileIntA(str str long) kernel32.GetProfileIntA
+@ stdcall GetProfileIntW(wstr wstr long) kernel32.GetProfileIntW
+@ stdcall GetProfileSectionA(str ptr long) kernel32.GetProfileSectionA
+@ stdcall GetProfileSectionW(wstr ptr long) kernel32.GetProfileSectionW
+@ stdcall GetProfileStringA(str str str ptr long) kernel32.GetProfileStringA
+@ stdcall GetProfileStringW(wstr wstr wstr ptr long) kernel32.GetProfileStringW
+@ stdcall WritePrivateProfileSectionA(str str str) kernel32.WritePrivateProfileSectionA
+@ stdcall WritePrivateProfileStringA(str str str str) kernel32.WritePrivateProfileStringA
+@ stdcall WritePrivateProfileStringW(wstr wstr wstr wstr) kernel32.WritePrivateProfileStringW
--
2.35.1
1
4
10 Feb '22
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmstyle/tests/Makefile.in | 1 -
dlls/dmstyle/tests/dmstyle.c | 152 ++++++++++++++++-----------------
2 files changed, 76 insertions(+), 77 deletions(-)
diff --git a/dlls/dmstyle/tests/Makefile.in b/dlls/dmstyle/tests/Makefile.in
index a98f5dd6c27..ec8b0636014 100644
--- a/dlls/dmstyle/tests/Makefile.in
+++ b/dlls/dmstyle/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmstyle.dll
IMPORTS = ole32
diff --git a/dlls/dmstyle/tests/dmstyle.c b/dlls/dmstyle/tests/dmstyle.c
index 69c33ad73cf..4b16cdad1a1 100644
--- a/dlls/dmstyle/tests/dmstyle.c
+++ b/dlls/dmstyle/tests/dmstyle.c
@@ -55,13 +55,13 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dms8);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicStyle8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicStyle8 create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dms8, "dms8 = %p\n", dms8);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dms8);
- ok(hr == E_NOINTERFACE, "DirectMusicStyle8 create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicStyle8 create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicStyle8 interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
@@ -70,26 +70,26 @@ static void test_COM(void)
win_skip("Old version without IDirectMusicStyle8\n");
return;
}
- ok(hr == S_OK, "DirectMusicStyle8 create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle8 create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicStyle8_AddRef(dms8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicStyle8_QueryInterface(dms8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicStyle8_Release(dms8));
@@ -107,36 +107,36 @@ static void test_COM_section(void)
hr = CoCreateInstance(&CLSID_DirectMusicSection, (IUnknown *)0xdeadbeef, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&dmo);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicSection create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicSection create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!dmo, "dmo = %p\n", dmo);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicSection, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dmo);
todo_wine ok(hr == E_NOINTERFACE,
- "DirectMusicSection create failed: %08x, expected E_NOINTERFACE\n", hr);
+ "DirectMusicSection create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicObject interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicSection, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmo);
- todo_wine ok(hr == S_OK, "DirectMusicSection create failed: %08x, expected S_OK\n", hr);
+ todo_wine ok(hr == S_OK, "DirectMusicSection create failed: %#lx, expected S_OK\n", hr);
if (hr != S_OK) {
skip("DirectMusicSection not implemented\n");
return;
}
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicObject_QueryInterface(dmo, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicObject_Release(dmo));
@@ -174,32 +174,32 @@ static void test_COM_track(void)
continue;
}
ok(hr == CLASS_E_NOAGGREGATION,
- "%s create failed: %08x, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
+ "%s create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr);
ok(!dmt8, "dmt8 = %p\n", dmt8);
/* Invalid RIID */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject,
(void**)&dmt8);
- ok(hr == E_NOINTERFACE, "%s create failed: %08x, expected E_NOINTERFACE\n",
+ ok(hr == E_NOINTERFACE, "%s create failed: %#lx, expected E_NOINTERFACE\n",
class[i].name, hr);
/* Same refcount for all DirectMusicTrack interfaces */
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8,
(void**)&dmt8);
- ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
+ ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
refcount = IDirectMusicTrack8_AddRef(dmt8);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicTrack8_Release(dmt8));
@@ -216,23 +216,23 @@ static void test_dmstyle(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicStyle, (void**)&dms);
- ok(hr == S_OK, "DirectMusicStyle create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle create failed: %#lx, expected S_OK\n", hr);
/* IPersistStream */
hr = IDirectMusicStyle_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, &CLSID_DirectMusicStyle),
"Expected class CLSID_DirectMusicStyle got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods*/
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicStyle_Release(dms));
}
@@ -244,7 +244,7 @@ static void expect_getparam(IDirectMusicTrack8 *track, REFGUID type, const char
char buf[64] = { 0 };
hr = IDirectMusicTrack8_GetParam(track, type, 0, NULL, buf);
- ok(hr == expect, "GetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
+ ok(hr == expect, "GetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void expect_setparam(IDirectMusicTrack8 *track, REFGUID type, const char *name,
@@ -253,7 +253,7 @@ static void expect_setparam(IDirectMusicTrack8 *track, REFGUID type, const char
HRESULT hr;
hr = IDirectMusicTrack8_SetParam(track, type, 0, track);
- ok(hr == expect, "SetParam(%s) failed: %08x, expected %08x\n", name, hr, expect);
+ ok(hr == expect, "SetParam(%s) failed: %#lx, expected %#lx\n", name, hr, expect);
}
static void test_track(void)
@@ -322,36 +322,36 @@ static void test_track(void)
trace("Testing %s\n", class[i].name);
hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8,
(void**)&dmt8);
- ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr);
+ ok(hr == S_OK, "%s create failed: %#lx, expected S_OK\n", class[i].name, hr);
/* IDirectMusicTrack8 */
hr = IDirectMusicTrack8_Init(dmt8, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
if (class[i].clsid != &CLSID_DirectMusicChordTrack &&
class[i].clsid != &CLSID_DirectMusicCommandTrack) {
/* Crashes on native */
hr = IDirectMusicTrack8_InitPlay(dmt8, NULL, NULL, NULL, 0, 0);
if (class[i].clsid == &CLSID_DirectMusicMuteTrack)
- ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ ok(hr == S_OK, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
else
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_GetParam(dmt8, NULL, 0, NULL, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParam(dmt8, NULL, 0, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_SetParam failed: %#lx\n", hr);
hr = IDirectMusicTrack8_IsParamSupported(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_IsParamSupported failed: %#lx\n", hr);
for (j = 0; j < ARRAY_SIZE(param_types); j++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt8, param_types[j].type);
if (class[i].has_params & (1 << j))
- ok(hr == S_OK, "IsParamSupported(%s) failed: %08x, expected S_OK\n",
+ ok(hr == S_OK, "IsParamSupported(%s) failed: %#lx, expected S_OK\n",
param_types[j].name, hr);
else {
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
- "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
+ "IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
param_types[j].name, hr);
if (class[i].clsid == &CLSID_DirectMusicChordTrack) {
expect_setparam(dmt8, param_types[j].type, param_types[j].name,
@@ -410,53 +410,53 @@ static void test_track(void)
if (class[i].clsid == &CLSID_DirectMusicMuteTrack) {
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
} else todo_wine {
hr = IDirectMusicTrack8_AddNotificationType(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt8, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
}
todo_wine {
hr = IDirectMusicTrack8_Clone(dmt8, 0, 0, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt8, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_GetParamEx(dmt8, NULL, 0, NULL, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_GetParamEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_SetParamEx(dmt8, NULL, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_SetParamEx failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_Compose(dmt8, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
if (class[i].has_join) {
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
} else {
hr = IDirectMusicTrack8_Join(dmt8, NULL, 0, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
}
/* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &classid);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&classid, class[i].clsid),
"Expected class %s got %s\n", class[i].name, wine_dbgstr_guid(&classid));
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
if (class[i].has_save)
- ok(hr == E_POINTER, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IPersistStream_Save failed: %#lx\n", hr);
else
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicTrack8_Release(dmt8));
}
@@ -570,12 +570,12 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicStyle, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicStyle create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicStyle create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData & DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData & DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
@@ -585,8 +585,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
@@ -596,25 +596,25 @@ static void test_parsedescriptor(void)
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == DMUS_E_CHUNKNOTFOUND,
- "ParseDescriptor failed: %08x, expected DMUS_E_CHUNKNOTFOUND\n", hr);
+ "ParseDescriptor failed: %#lx, expected DMUS_E_CHUNKNOTFOUND\n", hr);
IStream_Release(stream);
/* All desc chunks, DMUS_OBJ_CATEGORY not supported */
stream = gen_riff_stream(alldesc);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicStyle),
"Got class guid %s, expected CLSID_DirectMusicStyle\n",
wine_dbgstr_guid(&desc.guidClass));
@@ -629,9 +629,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_NAME),
- "Got valid data %#x, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_CLASS | DMUS_OBJ_NAME\n", desc.dwValidData);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
@@ -641,8 +641,8 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(inam);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#x, expected DMUS_OBJ_CLASS\n",
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(desc.dwValidData == DMUS_OBJ_CLASS, "Got valid data %#lx, expected DMUS_OBJ_CLASS\n",
desc.dwValidData);
IStream_Release(stream);
@@ -650,9 +650,9 @@ static void test_parsedescriptor(void)
stream = gen_riff_stream(dupes);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
valid = DMUS_OBJ_OBJECT|DMUS_OBJ_CLASS|DMUS_OBJ_NAME|DMUS_OBJ_VERSION;
- ok(desc.dwValidData == valid, "Got valid data %#x, expected %#x\n", desc.dwValidData, valid);
+ ok(desc.dwValidData == valid, "Got valid data %#lx, expected %#lx\n", desc.dwValidData, valid);
ok(!lstrcmpW(desc.wszName, L"INAM"), "Got name '%s', expected 'INAM'\n",
wine_dbgstr_w(desc.wszName));
IStream_Release(stream);
--
2.34.1
1
0
10 Feb '22
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/dmscript/tests/Makefile.in | 1 -
dlls/dmscript/tests/dmscript.c | 109 ++++++++++++++++----------------
2 files changed, 54 insertions(+), 56 deletions(-)
diff --git a/dlls/dmscript/tests/Makefile.in b/dlls/dmscript/tests/Makefile.in
index 5cc5553e2ca..a4b246d0931 100644
--- a/dlls/dmscript/tests/Makefile.in
+++ b/dlls/dmscript/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = dmscript.dll
IMPORTS = ole32
diff --git a/dlls/dmscript/tests/dmscript.c b/dlls/dmscript/tests/dmscript.c
index 30b64d5788d..f3ae2c940d2 100644
--- a/dlls/dmscript/tests/dmscript.c
+++ b/dlls/dmscript/tests/dmscript.c
@@ -94,37 +94,37 @@ static void test_COM(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, &unk_obj.IUnknown_iface, CLSCTX_INPROC_SERVER,
&IID_IUnknown, (void**)&unk_obj.inner_unk);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicScript create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicScript create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!unk_obj.inner_unk, "unk_obj.inner_unk = %p\n", unk_obj.inner_unk);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory,
(void**)&dms);
- ok(hr == E_NOINTERFACE, "DirectMusicScript create failed: %08x, expected E_NOINTERFACE\n", hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicScript create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicScript interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicScript, (void**)&dms);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicScript_AddRef(dms);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IDirectMusicObject, (void**)&dmo);
- ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %#lx\n", hr);
refcount = IDirectMusicObject_AddRef(dmo);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
refcount = IDirectMusicObject_Release(dmo);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IPersistStream_Release(ps);
hr = IDirectMusicScript_QueryInterface(dms, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 6, "refcount == %u, expected 6\n", refcount);
+ ok(refcount == 6, "refcount == %lu, expected 6\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicScript_Release(dms));
@@ -143,32 +143,31 @@ static void test_COM_scripttrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, &unk_obj.IUnknown_iface,
CLSCTX_INPROC_SERVER, &IID_IUnknown, (void**)&unk_obj.inner_unk);
ok(hr == CLASS_E_NOAGGREGATION,
- "DirectMusicScriptTrack create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr);
+ "DirectMusicScriptTrack create failed: %#lx, expected CLASS_E_NOAGGREGATION\n", hr);
ok(!unk_obj.inner_unk, "unk_obj.inner_unk = %p\n", unk_obj.inner_unk);
/* Invalid RIID */
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmt);
- ok(hr == E_NOINTERFACE, "DirectMusicScriptTrack create failed: %08x, expected E_NOINTERFACE\n",
- hr);
+ ok(hr == E_NOINTERFACE, "DirectMusicScriptTrack create failed: %#lx, expected E_NOINTERFACE\n", hr);
/* Same refcount for all DirectMusicScriptTrack interfaces */
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack, (void**)&dmt);
- ok(hr == S_OK, "DirectMusicScriptTrack create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScriptTrack create failed: %#lx, expected S_OK\n", hr);
refcount = IDirectMusicTrack_AddRef(dmt);
- ok(refcount == 2, "refcount == %u, expected 2\n", refcount);
+ ok(refcount == 2, "refcount == %lu, expected 2\n", refcount);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
refcount = IPersistStream_AddRef(ps);
- ok(refcount == 4, "refcount == %u, expected 4\n", refcount);
+ ok(refcount == 4, "refcount == %lu, expected 4\n", refcount);
IPersistStream_Release(ps);
hr = IDirectMusicTrack_QueryInterface(dmt, &IID_IUnknown, (void**)&unk);
- ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %#lx\n", hr);
refcount = IUnknown_AddRef(unk);
- ok(refcount == 5, "refcount == %u, expected 5\n", refcount);
+ ok(refcount == 5, "refcount == %lu, expected 5\n", refcount);
refcount = IUnknown_Release(unk);
while (IDirectMusicTrack_Release(dmt));
@@ -184,19 +183,19 @@ static void test_dmscript(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicScript, (void**)&dms);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
/* Unimplemented IPersistStream methods */
hr = IDirectMusicScript_QueryInterface(dms, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetClassID failed: %#lx\n", hr);
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicScript_Release(dms));
}
@@ -249,67 +248,67 @@ static void test_scripttrack(void)
hr = CoCreateInstance(&CLSID_DirectMusicScriptTrack, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicTrack8, (void**)&dmt);
- ok(hr == S_OK, "DirectMusicScriptTrack create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScriptTrack create failed: %#lx, expected S_OK\n", hr);
/* IDirectMusicTrack8 */
todo_wine {
hr = IDirectMusicTrack8_Init(dmt, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Init failed: %#lx\n", hr);
hr = IDirectMusicTrack8_InitPlay(dmt, NULL, NULL, NULL, 0, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_InitPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_EndPlay(dmt, NULL);
- ok(hr == E_POINTER, "IDirectMusicTrack8_EndPlay failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_EndPlay failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Play(dmt, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- ok(hr == E_POINTER, "IDirectMusicTrack8_Play failed: %08x\n", hr);
+ ok(hr == E_POINTER, "IDirectMusicTrack8_Play failed: %#lx\n", hr);
}
hr = IDirectMusicTrack8_GetParam(dmt, NULL, 0, NULL, NULL);
- ok(hr == DMUS_E_GET_UNSUPPORTED, "IDirectMusicTrack8_GetParam failed: %08x\n", hr);
+ ok(hr == DMUS_E_GET_UNSUPPORTED, "IDirectMusicTrack8_GetParam failed: %#lx\n", hr);
for (i = 0; i < ARRAY_SIZE(unsupported); i++) {
hr = IDirectMusicTrack8_IsParamSupported(dmt, unsupported[i].type);
ok(hr == DMUS_E_TYPE_UNSUPPORTED,
- "IsParamSupported(%s) failed: %08x, expected DMUS_E_TYPE_UNSUPPORTED\n",
+ "IsParamSupported(%s) failed: %#lx, expected DMUS_E_TYPE_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_GetParam(dmt, unsupported[i].type, 0, NULL, buf);
ok(hr == DMUS_E_GET_UNSUPPORTED,
- "GetParam(%s) failed: %08x, expected DMUS_E_GET_UNSUPPORTED\n",
+ "GetParam(%s) failed: %#lx, expected DMUS_E_GET_UNSUPPORTED\n",
unsupported[i].name, hr);
hr = IDirectMusicTrack8_SetParam(dmt, unsupported[i].type, 0, buf);
ok(hr == DMUS_E_SET_UNSUPPORTED,
- "SetParam(%s) failed: %08x, expected DMUS_E_SET_UNSUPPORTED\n",
+ "SetParam(%s) failed: %#lx, expected DMUS_E_SET_UNSUPPORTED\n",
unsupported[i].name, hr);
}
hr = IDirectMusicTrack8_AddNotificationType(dmt, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_AddNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_RemoveNotificationType(dmt, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_RemoveNotificationType failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Clone(dmt, 0, 0, NULL);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_Clone failed: %#lx\n", hr);
hr = IDirectMusicTrack8_PlayEx(dmt, NULL, 0, 0, 0, 0, NULL, NULL, 0);
- todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %08x\n", hr);
+ todo_wine ok(hr == E_POINTER, "IDirectMusicTrack8_PlayEx failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Compose(dmt, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Compose failed: %#lx\n", hr);
hr = IDirectMusicTrack8_Join(dmt, NULL, 0, NULL, 0, NULL);
- ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IDirectMusicTrack8_Join failed: %#lx\n", hr);
/* IPersistStream */
hr = IDirectMusicTrack8_QueryInterface(dmt, &IID_IPersistStream, (void**)&ps);
- ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr);
+ ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, NULL);
- ok(hr == E_POINTER, "got 0x%08x\n", hr);
+ ok(hr == E_POINTER, "got %#lx\n", hr);
hr = IPersistStream_GetClassID(ps, &class);
- ok(hr == S_OK, "IPersistStream_GetClassID failed: %08x\n", hr);
+ ok(hr == S_OK, "IPersistStream_GetClassID failed: %#lx\n", hr);
ok(IsEqualGUID(&class, &CLSID_DirectMusicScriptTrack),
"Expected class CLSID_DirectMusicScriptTrack got %s\n", wine_dbgstr_guid(&class));
/* Unimplemented IPersistStream methods */
hr = IPersistStream_IsDirty(ps);
- ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %08x\n", hr);
+ ok(hr == S_FALSE, "IPersistStream_IsDirty failed: %#lx\n", hr);
hr = IPersistStream_GetSizeMax(ps, &size);
- ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_GetSizeMax failed: %#lx\n", hr);
hr = IPersistStream_Save(ps, NULL, TRUE);
- ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %08x\n", hr);
+ ok(hr == E_NOTIMPL, "IPersistStream_Save failed: %#lx\n", hr);
while (IDirectMusicTrack8_Release(dmt));
}
@@ -370,41 +369,41 @@ static void test_parsedescriptor(void)
hr = CoCreateInstance(&CLSID_DirectMusicScript, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void **)&dmo);
- ok(hr == S_OK, "DirectMusicScript create failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "DirectMusicScript create failed: %#lx, expected S_OK\n", hr);
/* Nothing loaded */
hr = IDirectMusicObject_GetDescriptor(dmo, &desc);
- ok(hr == S_OK, "GetDescriptor failed: %08x, expected S_OK\n", hr);
+ ok(hr == S_OK, "GetDescriptor failed: %#lx, expected S_OK\n", hr);
todo_wine ok(desc.dwValidData == (DMUS_OBJ_CLASS | DMUS_OBJ_VERSION),
- "Got valid data %#x, expected DMUS_OBJ_OBJECT | DMUS_OBJ_VERSION\n", desc.dwValidData);
+ "Got valid data %#lx, expected DMUS_OBJ_OBJECT | DMUS_OBJ_VERSION\n", desc.dwValidData);
ok(IsEqualGUID(&desc.guidClass, &CLSID_DirectMusicScript),
"Got class guid %s, expected CLSID_DirectMusicScript\n",
wine_dbgstr_guid(&desc.guidClass));
ok(!desc.vVersion.dwVersionMS && !desc.vVersion.dwVersionLS,
- "Got DMUS_VERSION %u.%u, expected 0.0\n", desc.vVersion.dwVersionMS,
+ "Got DMUS_VERSION %lu.%lu, expected 0.0\n", desc.vVersion.dwVersionMS,
desc.vVersion.dwVersionLS);
/* Empty RIFF stream */
stream = gen_riff_stream(empty);
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
- ok(hr == S_OK, "ParseDescriptor failed: %08x, expected S_OK\n", hr);
- ok(!desc.dwValidData, "Got valid data %#x, expected 0\n", desc.dwValidData);
+ ok(hr == S_OK, "ParseDescriptor failed: %#lx, expected S_OK\n", hr);
+ ok(!desc.dwValidData, "Got valid data %#lx, expected 0\n", desc.dwValidData);
IStream_Release(stream);
/* NULL pointers */
memset(&desc, 0, sizeof(desc));
hr = IDirectMusicObject_ParseDescriptor(dmo, NULL, &desc);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, NULL);
- ok(hr == E_POINTER, "ParseDescriptor failed: %08x, expected E_POINTER\n", hr);
+ ok(hr == E_POINTER, "ParseDescriptor failed: %#lx, expected E_POINTER\n", hr);
/* Wrong form */
empty[1] = DMUS_FOURCC_CONTAINER_FORM;
stream = gen_riff_stream(empty);
hr = IDirectMusicObject_ParseDescriptor(dmo, stream, &desc);
ok(hr == DMUS_E_SCRIPT_INVALID_FILE,
- "ParseDescriptor failed: %08x, expected DMUS_E_SCRIPT_INVALID_FILE\n", hr);
+ "ParseDescriptor failed: %#lx, expected DMUS_E_SCRIPT_INVALID_FILE\n", hr);
IStream_Release(stream);
IDirectMusicObject_Release(dmo);
--
2.34.1
1
0