Wine-Devel
Threads by month
- ----- 2026 -----
- April
- 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
- 9 participants
- 84519 discussions
[PATCH vkd3d 1/2] vkd3d: Add a create thread implementation for Windows.
by Alexandre Julliard Feb. 7, 2022
by Alexandre Julliard Feb. 7, 2022
Feb. 7, 2022
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/vkd3d/device.c | 42 ++++++++++++++++++++++++++++++++++++++
libs/vkd3d/vkd3d_private.h | 14 +++++++++----
2 files changed, 52 insertions(+), 4 deletions(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c
index fe90eb37ef00..3360fd6eeeb8 100644
--- a/libs/vkd3d/device.c
+++ b/libs/vkd3d/device.c
@@ -4037,6 +4037,23 @@ void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason,
device->removed_reason = reason;
}
+
+#ifdef _WIN32
+struct thread_data
+{
+ PFN_vkd3d_thread main_pfn;
+ void *data;
+};
+
+static DWORD WINAPI call_thread_main(void *data)
+{
+ struct thread_data *thread_data = data;
+ thread_data->main_pfn(thread_data->data);
+ vkd3d_free(thread_data);
+ return 0;
+}
+#endif
+
HRESULT vkd3d_create_thread(struct vkd3d_instance *instance,
PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread)
{
@@ -4053,11 +4070,27 @@ HRESULT vkd3d_create_thread(struct vkd3d_instance *instance,
}
else
{
+#ifdef _WIN32
+ struct thread_data *thread_data;
+
+ if (!(thread_data = vkd3d_malloc(sizeof(*thread_data))))
+ return E_OUTOFMEMORY;
+
+ thread_data->main_pfn = thread_main;
+ thread_data->data = data;
+ if (!(thread->handle = CreateThread(NULL, 0, call_thread_main, thread_data, 0, NULL)))
+ {
+ ERR("Failed to create thread, error %d.\n", GetLastError());
+ vkd3d_free(thread_data);
+ hr = E_FAIL;
+ }
+#else
if ((rc = pthread_create(&thread->pthread, NULL, thread_main, data)))
{
ERR("Failed to create thread, error %d.\n", rc);
hr = hresult_from_errno(rc);
}
+#endif
}
return hr;
@@ -4075,11 +4108,20 @@ HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_ha
}
else
{
+#ifdef _WIN32
+ if ((rc = WaitForSingleObject(thread->handle, INFINITE)) != WAIT_OBJECT_0)
+ {
+ ERR("Failed to wait for thread, ret %#x.\n", rc);
+ hr = E_FAIL;
+ }
+ CloseHandle(thread->handle);
+#else
if ((rc = pthread_join(thread->pthread, NULL)))
{
ERR("Failed to join thread, error %d.\n", rc);
hr = hresult_from_errno(rc);
}
+#endif
}
return hr;
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h
index ece111325e77..67989c11285a 100644
--- a/libs/vkd3d/vkd3d_private.h
+++ b/libs/vkd3d/vkd3d_private.h
@@ -40,7 +40,6 @@
#include <assert.h>
#include <inttypes.h>
#include <limits.h>
-#include <pthread.h>
#include <stdbool.h>
#define VK_CALL(f) (vk_procs->f)
@@ -169,14 +168,13 @@ struct vkd3d_instance
LONG refcount;
};
+#ifdef _WIN32
+
union vkd3d_thread_handle
{
- pthread_t pthread;
void *handle;
};
-#ifdef _WIN32
-
struct vkd3d_mutex
{
CRITICAL_SECTION lock;
@@ -241,6 +239,14 @@ static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond)
#else /* _WIN32 */
+#include <pthread.h>
+
+union vkd3d_thread_handle
+{
+ pthread_t pthread;
+ void *handle;
+};
+
struct vkd3d_mutex
{
pthread_mutex_t lock;
--
2.34.1
2
1
[PATCH vkd3d 1/5] vkd3d: Pass shader extension info to all graphics stages.
by Conor McCarthy Feb. 7, 2022
by Conor McCarthy Feb. 7, 2022
Feb. 7, 2022
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com>
---
libs/vkd3d/state.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c
index fa4de634..a7a878ca 100644
--- a/libs/vkd3d/state.c
+++ b/libs/vkd3d/state.c
@@ -2515,13 +2515,14 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
VkVertexInputBindingDivisorDescriptionEXT *binding_divisor;
const struct vkd3d_vulkan_info *vk_info = &device->vk_info;
uint32_t instance_divisors[D3D12_VS_INPUT_REGISTER_COUNT];
+ struct vkd3d_shader_spirv_target_info *stage_target_info;
uint32_t aligned_offsets[D3D12_VS_INPUT_REGISTER_COUNT];
+ struct vkd3d_shader_descriptor_offset_info offset_info;
struct vkd3d_shader_parameter ps_shader_parameters[1];
struct vkd3d_shader_transform_feedback_info xfb_info;
struct vkd3d_shader_spirv_target_info ps_target_info;
struct vkd3d_shader_interface_info shader_interface;
- struct vkd3d_shader_descriptor_offset_info offset_info;
- struct vkd3d_shader_spirv_target_info *target_info;
+ struct vkd3d_shader_spirv_target_info target_info;
const struct d3d12_root_signature *root_signature;
struct vkd3d_shader_signature input_signature;
bool have_attachment, is_dsv_format_unknown;
@@ -2726,6 +2727,12 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
}
}
+ memset(&target_info, 0, sizeof(target_info));
+ target_info.type = VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO;
+ target_info.environment = VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0;
+ target_info.extensions = vk_info->shader_extensions;
+ target_info.extension_count = vk_info->shader_extension_count;
+
graphics->xfb_enabled = false;
if (so_desc->NumEntries)
{
@@ -2778,7 +2785,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
offset_info.descriptor_table_count = 0;
offset_info.binding_offsets = root_signature->descriptor_offsets;
offset_info.uav_counter_offsets = NULL;
- vkd3d_prepend_struct(&shader_interface, &offset_info);
}
for (i = 0; i < ARRAY_SIZE(shader_stages); ++i)
@@ -2810,7 +2816,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
shader_interface.uav_counters = NULL;
shader_interface.uav_counter_count = 0;
- target_info = NULL;
+ stage_target_info = &target_info;
switch (shader_stages[i].stage)
{
case VK_SHADER_STAGE_VERTEX_BIT:
@@ -2837,7 +2843,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
case VK_SHADER_STAGE_FRAGMENT_BIT:
shader_interface.uav_counters = state->uav_counters.bindings;
shader_interface.uav_counter_count = state->uav_counters.binding_count;
- target_info = &ps_target_info;
+ stage_target_info = &ps_target_info;
break;
default:
@@ -2846,10 +2852,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
}
shader_interface.next = NULL;
+ xfb_info.next = NULL;
+ ps_target_info.next = NULL;
+ target_info.next = NULL;
+ offset_info.next = NULL;
if (shader_stages[i].stage == xfb_stage)
vkd3d_prepend_struct(&shader_interface, &xfb_info);
- if (target_info)
- vkd3d_prepend_struct(&shader_interface, target_info);
+ vkd3d_prepend_struct(&shader_interface, stage_target_info);
+ if (root_signature->descriptor_offsets)
+ vkd3d_prepend_struct(&shader_interface, &offset_info);
if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count],
shader_stages[i].stage, b, &shader_interface)))
--
2.34.1
2
7
[PATCH 2/4] d3d10core/tests: Don't run the 32-bit tests multithreaded.
by Henri Verbeet Feb. 7, 2022
by Henri Verbeet Feb. 7, 2022
Feb. 7, 2022
From: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v4: Modify "use_mt" instead of run_queued_tests().
This supersedes patch 225754.
dlls/d3d10core/tests/d3d10core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c
index a5f7f4202d52..49622bd0e264 100644
--- a/dlls/d3d10core/tests/d3d10core.c
+++ b/dlls/d3d10core/tests/d3d10core.c
@@ -19223,6 +19223,11 @@ START_TEST(d3d10core)
char **argv;
use_mt = !getenv("WINETEST_NO_MT_D3D");
+ /* Some host drivers (MacOS, Mesa radeonsi) never unmap memory even when
+ * requested. When using the chunk allocator, running the tests with more
+ * than one thread can exceed the 32-bit virtual address space. */
+ if (sizeof(void *) == 4 && !strcmp(winetest_platform, "wine"))
+ use_mt = FALSE;
argc = winetest_get_mainargs(&argv);
for (i = 2; i < argc; ++i)
--
2.30.2
1
0
Feb. 7, 2022
From: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
v4: Modify "use_mt" instead of run_queued_tests().
This supersedes patch 225755.
dlls/d2d1/tests/d2d1.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c
index 2ac48e026c32..ba67dd53111c 100644
--- a/dlls/d2d1/tests/d2d1.c
+++ b/dlls/d2d1/tests/d2d1.c
@@ -10551,6 +10551,11 @@ START_TEST(d2d1)
pD2D1ConvertColorSpace = (void *)GetProcAddress(d2d1_dll, "D2D1ConvertColorSpace");
use_mt = !getenv("WINETEST_NO_MT_D3D");
+ /* Some host drivers (MacOS, Mesa radeonsi) never unmap memory even when
+ * requested. When using the chunk allocator, running the tests with more
+ * than one thread can exceed the 32-bit virtual address space. */
+ if (sizeof(void *) == 4 && !strcmp(winetest_platform, "wine"))
+ use_mt = FALSE;
argc = winetest_get_mainargs(&argv);
for (i = 2; i < argc; ++i)
--
2.30.2
1
0
Feb. 7, 2022
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
v2: fixed test breakage
dlls/xmllite/tests/Makefile.in | 1 -
dlls/xmllite/tests/reader.c | 488 +++++++++++------------
dlls/xmllite/tests/writer.c | 694 ++++++++++++++++-----------------
3 files changed, 591 insertions(+), 592 deletions(-)
diff --git a/dlls/xmllite/tests/Makefile.in b/dlls/xmllite/tests/Makefile.in
index 1548dc50193..6a87e6663aa 100644
--- a/dlls/xmllite/tests/Makefile.in
+++ b/dlls/xmllite/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = xmllite.dll
IMPORTS = xmllite ole32
diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
index c4e53a5c40c..d0d2373aaf1 100644
--- a/dlls/xmllite/tests/reader.c
+++ b/dlls/xmllite/tests/reader.c
@@ -50,7 +50,7 @@ static IStream *create_stream_on_data(const void *data, unsigned int size)
memcpy(ptr, data, size);
hr = CreateStreamOnHGlobal(hglobal, TRUE, &stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(stream != NULL, "Expected non-NULL stream\n");
GlobalUnlock(hglobal);
@@ -209,7 +209,7 @@ static void _set_input_string(unsigned line, IXmlReader *reader, const char *xml
stream = create_stream_on_data(xml, strlen(xml));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok_(__FILE__,line)(hr == S_OK, "got %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
}
@@ -222,9 +222,9 @@ static void _read_node(unsigned line, IXmlReader *reader, XmlNodeType expected_t
hr = IXmlReader_Read(reader, &type);
if (expected_type == XmlNodeType_None)
- ok_(__FILE__,line)(hr == S_FALSE, "Read returned %08x, expected S_FALSE\n", hr);
+ ok_(__FILE__,line)(hr == S_FALSE, "Read returned %#lx, expected S_FALSE.\n", hr);
else
- ok_(__FILE__,line)(hr == S_OK, "Read returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Read returned %#lx.\n", hr);
ok_(__FILE__,line)(type == expected_type, "read type %d, expected %d\n", type, expected_type);
}
@@ -233,7 +233,7 @@ static void _next_attribute(unsigned line, IXmlReader *reader)
{
HRESULT hr;
hr = IXmlReader_MoveToNextAttribute(reader);
- ok_(__FILE__,line)(hr == S_OK, "MoveToNextAttribute returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
#define move_to_element(a) _move_to_element(__LINE__,a)
@@ -241,7 +241,7 @@ static void _move_to_element(unsigned line, IXmlReader *reader)
{
HRESULT hr;
hr = IXmlReader_MoveToElement(reader);
- ok_(__FILE__,line)(hr == S_OK, "MoveToElement failed: %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
static void test_read_state(IXmlReader *reader, XmlReadState expected,
@@ -269,11 +269,11 @@ static void test_read_state(IXmlReader *reader, XmlReadState expected,
static const WCHAR *_reader_value(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetValue(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetValue returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "value = %s\n", wine_dbgstr_w(str));
return str;
@@ -283,12 +283,12 @@ static const WCHAR *_reader_value(unsigned line, IXmlReader *reader, const WCHAR
static const WCHAR *_reader_name(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetLocalName(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetLocalName returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "name = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -297,12 +297,12 @@ static const WCHAR *_reader_name(unsigned line, IXmlReader *reader, const WCHAR
static const WCHAR *_reader_prefix(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetPrefix(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetPrefix returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "prefix = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -311,12 +311,12 @@ static const WCHAR *_reader_prefix(unsigned line, IXmlReader *reader, const WCHA
static const WCHAR *_reader_namespace(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetNamespaceUri(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetNamespaceUri returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "namespace = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -325,12 +325,12 @@ static const WCHAR *_reader_namespace(unsigned line, IXmlReader *reader, const W
static const WCHAR *_reader_qname(IXmlReader *reader, const WCHAR *expect, unsigned line)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetQualifiedName returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "name = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -343,7 +343,7 @@ static void _read_value_char(IXmlReader *reader, WCHAR expected_char, unsigned l
HRESULT hr;
hr = IXmlReader_ReadValueChunk(reader, &c, 1, &count);
- ok_(__FILE__,line)(hr == S_OK, "got %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_(__FILE__,line)(count == 1, "got %u\n", c);
ok_(__FILE__,line)(c == expected_char, "got %x\n", c);
}
@@ -528,84 +528,84 @@ static void test_reader_create(void)
}
hr = CreateXmlReader(&IID_IStream, (void **)&unk, NULL);
- ok(hr == E_NOINTERFACE, "got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlReader(&IID_IUnknown, (void **)&unk, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IXmlReader, (void **)&reader);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == (IUnknown *)reader, "unexpected interface\n");
IXmlReader_Release(reader);
IUnknown_Release(unk);
hr = CreateXmlReader(&IID_IUnknown, (void **)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IXmlReader_Release(reader);
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Closed);
nodetype = XmlNodeType_Element;
hr = IXmlReader_GetNodeType(reader, &nodetype);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got %d\n", nodetype);
/* crashes on XP, 2k3, works on newer versions */
if (0)
{
hr = IXmlReader_GetNodeType(reader, NULL);
- ok(hr == E_INVALIDARG, "got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
}
resolver = (void*)0xdeadbeef;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR*)&resolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(resolver == NULL, "got %p\n", resolver);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR)&testresolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
resolver = NULL;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR*)&resolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(resolver == &testresolver, "got %p\n", resolver);
IXmlResolver_Release(resolver);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
dtd = 2;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_DtdProcessing, (LONG_PTR*)&dtd);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dtd == DtdProcessing_Prohibit, "got %d\n", dtd);
dtd = 2;
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, dtd);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, -1);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Null input pointer, releases previous input */
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
/* test input interface selection sequence */
hr = testinput_createinstance((void**)&input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
input_iids.count = 0;
hr = IXmlReader_SetInput(reader, input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_full, setinput_full_old, FALSE);
IUnknown_Release(input);
}
@@ -623,71 +623,71 @@ static void test_readerinput(void)
LONG ref;
hr = CreateXmlReaderInputWithEncodingName(NULL, NULL, NULL, FALSE, NULL, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlReaderInputWithEncodingName(NULL, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IStream_AddRef(stream);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IStream_Release(stream);
hr = CreateXmlReaderInputWithEncodingName((IUnknown*)stream, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(reader_input, &IID_IStream, (void**)&stream2);
- ok(hr == E_NOINTERFACE, "Expected S_OK, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(reader_input, &IID_ISequentialStream, (void**)&stream2);
- ok(hr == E_NOINTERFACE, "Expected S_OK, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* IXmlReaderInput grabs a stream reference */
ref = IStream_AddRef(stream);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IStream_Release(stream);
/* try ::SetInput() with valid IXmlReaderInput */
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Initial);
nodetype = XmlNodeType_Element;
hr = IXmlReader_GetNodeType(reader, &nodetype);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got %d\n", nodetype);
/* IXmlReader grabs a IXmlReaderInput reference */
ref = IUnknown_AddRef(reader_input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
ref = IStream_AddRef(stream);
- ok(ref == 4, "Expected 4, got %d\n", ref);
+ ok(ref == 4, "Expected 4, got %ld.\n", ref);
IStream_Release(stream);
/* reset input and check state */
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
IXmlReader_Release(reader);
ref = IStream_AddRef(stream);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IStream_Release(stream);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
/* IID_IXmlReaderInput */
@@ -696,9 +696,9 @@ static void test_readerinput(void)
Such query will be used only to check if input is really IXmlReaderInput */
obj = (IUnknown*)0xdeadbeef;
hr = IUnknown_QueryInterface(reader_input, &IID_IXmlReaderInput, (void**)&obj);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
IUnknown_Release(reader_input);
@@ -708,59 +708,59 @@ static void test_readerinput(void)
/* test input interface selection sequence */
input = NULL;
hr = testinput_createinstance((void**)&input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_iids.count = 0;
ref = IUnknown_AddRef(input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(input);
hr = CreateXmlReaderInputWithEncodingName(input, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, empty_seq, NULL, FALSE);
/* IXmlReaderInput stores stream interface as IUnknown */
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_iids.count = 0;
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
TEST_READER_STATE(reader, XmlReadState_Closed);
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
ref = IUnknown_AddRef(reader_input);
ok(ref == 3 || broken(ref == 2) /* versions 1.0.x and 1.1.x - XP, Vista */,
- "Expected 3, got %d\n", ref);
+ "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
/* repeat another time, no check or caching here */
input_iids.count = 0;
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
/* another reader */
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader2, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* resolving from IXmlReaderInput to IStream/ISequentialStream is done at
::SetInput() level, each time it's called */
input_iids.count = 0;
hr = IXmlReader_SetInput(reader2, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
IXmlReader_Release(reader2);
@@ -777,11 +777,11 @@ static void test_reader_state(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* invalid arguments */
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_ReadState, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* attempt to read on closed reader */
TEST_READER_STATE(reader, XmlReadState_Closed);
@@ -790,7 +790,7 @@ if (0)
{
/* newer versions crash here, probably because no input was set */
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
}
set_input_string(reader, "xml");
TEST_READER_STATE(reader, XmlReadState_Initial);
@@ -798,7 +798,7 @@ if (0)
nodetype = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &nodetype);
todo_wine
- ok(FAILED(hr), "got %08x\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "Unexpected node type %d\n", nodetype);
todo_wine
@@ -807,7 +807,7 @@ if (0)
nodetype = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &nodetype);
todo_wine
- ok(FAILED(hr), "got %08x\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "Unexpected node type %d\n", nodetype);
IXmlReader_Release(reader);
@@ -850,26 +850,26 @@ static void test_read_xmldeclaration(void)
const WCHAR *val;
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = create_stream_on_data(xmldecl_full, sizeof(xmldecl_full));
hr = IXmlReader_SetInput(reader, (IUnknown*)stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "got %d\n", count);
/* try to move without attributes */
hr = IXmlReader_MoveToElement(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
TEST_READER_POSITION(reader, 0, 0);
@@ -890,7 +890,7 @@ static void test_read_xmldeclaration(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 55);
@@ -899,40 +899,40 @@ static void test_read_xmldeclaration(void)
next_attribute(reader);
next_attribute(reader);
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 55);
hr = IXmlReader_GetAttributeCount(reader, NULL);
- ok(hr == E_INVALIDARG, "got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 3, "Expected 3, got %d\n", count);
for (i = 0; i < count; i++)
{
len = 0;
hr = IXmlReader_GetLocalName(reader, &val, &len);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(name_val[i].name), "expected %u, got %u\n", lstrlenW(name_val[i].name), len);
ok(!lstrcmpW(name_val[i].name, val), "expected %s, got %s\n", wine_dbgstr_w(name_val[i].name), wine_dbgstr_w(val));
len = 0;
hr = IXmlReader_GetValue(reader, &val, &len);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(name_val[i].val), "expected %u, got %u\n", lstrlenW(name_val[i].val), len);
ok(!lstrcmpW(name_val[i].val, val), "expected %s, got %s\n", wine_dbgstr_w(name_val[i].val), wine_dbgstr_w(val));
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == ((i < count - 1) ? S_OK : S_FALSE), "got %08x\n", hr);
+ ok(hr == ((i < count - 1) ? S_OK : S_FALSE), "Unexpected hr %#lx.\n", hr);
}
TEST_DEPTH(reader, 1);
@@ -942,7 +942,7 @@ static void test_read_xmldeclaration(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_XmlDeclaration, "got %d\n", type);
type = XmlNodeType_XmlDeclaration;
@@ -950,7 +950,7 @@ static void test_read_xmldeclaration(void)
/* newer versions return syntax error here cause document is incomplete,
it makes more sense than invalid char error */
todo_wine {
- ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "got 0x%08x\n", hr);
+ ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "got %d\n", type);
}
IStream_Release(stream);
@@ -959,14 +959,14 @@ todo_wine {
stream = create_stream_on_data(xmldecl_short, sizeof(xmldecl_short));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_XmlDeclaration);
TEST_READER_POSITION2(reader, 1, 3, ~0u, 21);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "expected 1, got %d\n", count);
ret = IXmlReader_IsEmptyElement(reader);
@@ -982,20 +982,20 @@ todo_wine {
type = -1;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 21);
/* try to move from last attribute */
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "expected S_FALSE, got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
TEST_READER_POSITION2(reader, 1, 23, ~0u, 40);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "expected 0, got %d\n", count);
ret = IXmlReader_IsEmptyElement(reader);
@@ -1007,7 +1007,7 @@ todo_wine {
type = -1;
hr = IXmlReader_Read(reader, &type);
todo_wine
- ok(hr == WC_E_SYNTAX || hr == WC_E_XMLCHARACTER /* XP */, "expected WC_E_SYNTAX, got %08x\n", hr);
+ ok(hr == WC_E_SYNTAX || hr == WC_E_XMLCHARACTER /* XP */, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "expected XmlNodeType_None, got %s\n", type_to_str(type));
TEST_READER_POSITION(reader, 1, 41);
todo_wine
@@ -1053,7 +1053,7 @@ static void test_read_comment(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, teststr);
@@ -1066,7 +1066,7 @@ static void test_read_comment(void)
if (type == XmlNodeType_Text || type == XmlNodeType_Comment)
{
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*value != 0, "Expected node value\n");
}
i++;
@@ -1079,9 +1079,9 @@ static void test_read_comment(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1092,14 +1092,14 @@ static void test_read_comment(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
reader_qname(reader, L"");
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1134,7 +1134,7 @@ static void test_read_pi(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1145,9 +1145,9 @@ static void test_read_pi(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1160,7 +1160,7 @@ static void test_read_pi(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1230,7 +1230,7 @@ static void test_read_full(void)
int i;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test->xml);
@@ -1257,10 +1257,10 @@ static void test_read_public_dtd(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, DtdProcessing_Parse);
- ok(hr == S_OK, "got 0x%8x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test_public_dtd);
@@ -1268,15 +1268,15 @@ static void test_read_public_dtd(void)
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 2, "got %d\n", count);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"PUBLIC");
@@ -1286,7 +1286,7 @@ static void test_read_public_dtd(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"SYSTEM");
@@ -1298,7 +1298,7 @@ static void test_read_public_dtd(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine {
ok(len == lstrlenW(dtdnameW), "got %u\n", len);
ok(!lstrcmpW(str, dtdnameW), "got %s\n", wine_dbgstr_w(str));
@@ -1320,10 +1320,10 @@ static void test_read_system_dtd(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, DtdProcessing_Parse);
- ok(hr == S_OK, "got 0x%8x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test_system_dtd);
@@ -1331,15 +1331,15 @@ static void test_read_system_dtd(void)
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "got %d\n", count);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"SYSTEM");
@@ -1351,7 +1351,7 @@ static void test_read_system_dtd(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine {
ok(len == lstrlenW(dtdnameW), "got %u\n", len);
ok(!lstrcmpW(str, dtdnameW), "got %s\n", wine_dbgstr_w(str));
@@ -1397,7 +1397,7 @@ static void test_read_element(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1406,10 +1406,10 @@ static void test_read_element(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
todo_wine_if(test->hr == NC_E_UNDECLAREDPREFIX)
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1420,7 +1420,7 @@ static void test_read_element(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1444,7 +1444,7 @@ static void test_read_element(void)
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i], "%u: got depth %u, expected %u\n", i, depth, depths[i]);
if (type == XmlNodeType_Element || type == XmlNodeType_EndElement)
@@ -1453,7 +1453,7 @@ static void test_read_element(void)
prefix = NULL;
hr = IXmlReader_GetPrefix(reader, &prefix, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(prefix != NULL, "got %p\n", prefix);
if (!*prefix)
@@ -1462,12 +1462,12 @@ static void test_read_element(void)
local = NULL;
hr = IXmlReader_GetLocalName(reader, &local, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(local != NULL, "got %p\n", local);
qname = NULL;
hr = IXmlReader_GetQualifiedName(reader, &qname, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(qname != NULL, "got %p\n", qname);
ok(local == qname, "expected same pointer\n");
@@ -1478,7 +1478,7 @@ static void test_read_element(void)
{
count = 1;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "got %u\n", count);
}
@@ -1486,7 +1486,7 @@ static void test_read_element(void)
{
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* moving to attributes increases depth */
if (count)
@@ -1496,14 +1496,14 @@ static void test_read_element(void)
reader_value(reader, L"");
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetValue(reader, &value, NULL);
ok(*value != 0, "Unexpected value %s\n", wine_dbgstr_w(value));
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i] + 1, "%u: got depth %u, expected %u\n", i, depth, depths[i] + 1);
move_to_element(reader);
@@ -1511,7 +1511,7 @@ static void test_read_element(void)
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i], "%u: got depth %u, expected %u\n", i, depth, depths[i]);
}
}
@@ -1526,7 +1526,7 @@ static void test_read_element(void)
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == WC_E_ELEMENTMATCH, "got %08x\n", hr);
+ ok(hr == WC_E_ELEMENTMATCH, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "got %d\n", type);
TEST_READER_STATE(reader, XmlReadState_Error);
@@ -1544,16 +1544,16 @@ static void test_read_pending(void)
int c;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetInput(reader, (IUnknown*)&teststream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* first read call returns incomplete node, second attempt fails with E_PENDING */
stream_readcall = 0;
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK || broken(hr == E_PENDING), "got 0x%08x\n", hr);
+ ok(hr == S_OK || broken(hr == E_PENDING), "Unexpected hr %#lx.\n", hr);
/* newer versions are happy when it's enough data to detect node type,
older versions keep reading until it fails to read more */
todo_wine
@@ -1564,7 +1564,7 @@ static void test_read_pending(void)
c = stream_readcall;
value = (void*)0xdeadbeef;
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == E_PENDING, "got 0x%08x\n", hr);
+ ok(hr == E_PENDING, "Unexpected hr %#lx.\n", hr);
ok(value == NULL || broken(value == (void*)0xdeadbeef) /* Win8 sets it to NULL */, "got %p\n", value);
ok(c < stream_readcall || broken(c == stream_readcall), "got %d, expected %d\n", stream_readcall, c+1);
@@ -1581,12 +1581,12 @@ static void test_readvaluechunk(void)
UINT c;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<!-- comment1 --><!-- comment2 -->");
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Comment, "type = %u\n", type);
read_value_char(reader, ' ');
@@ -1599,13 +1599,13 @@ static void test_readvaluechunk(void)
c = 0;
b = 0;
hr = IXmlReader_ReadValueChunk(reader, &b, 1, &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(c == 0, "got %u\n", c);
ok(b == 0, "got %x\n", b);
c = 0xdeadbeef;
hr = IXmlReader_ReadValueChunk(reader, buf, 0, &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!c, "c = %u\n", c);
reader_value(reader, L"omment1 ");
@@ -1615,13 +1615,13 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
hr = IXmlReader_ReadValueChunk(reader, buf, 0, &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!c, "c = %u\n", c);
c = 0xdeadbeef;
memset(buf, 0xcc, sizeof(buf));
hr = IXmlReader_ReadValueChunk(reader, buf, ARRAY_SIZE(buf), &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(c == 10, "got %u\n", c);
ok(buf[c] == 0xcccc, "buffer overflow\n");
buf[c] = 0;
@@ -1630,7 +1630,7 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
memset(buf, 0xcc, sizeof(buf));
hr = IXmlReader_ReadValueChunk(reader, buf, ARRAY_SIZE(buf), &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(!c, "got %u\n", c);
/* portion read as chunk is skipped from resulting node value */
@@ -1640,7 +1640,7 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
b = 0xffff;
hr = IXmlReader_ReadValueChunk(reader, &b, 1, &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(c == 0, "got %u\n", c);
ok(b == 0xffff, "got %x\n", b);
@@ -1666,7 +1666,7 @@ static void test_read_cdata(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1685,9 +1685,9 @@ static void test_read_cdata(void)
}
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1699,19 +1699,19 @@ static void test_read_cdata(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == 0, "got %u\n", len);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1740,7 +1740,7 @@ static void test_read_text(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1757,7 +1757,7 @@ static void test_read_text(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
}
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1769,19 +1769,19 @@ static void test_read_text(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == 0, "got %u\n", len);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1812,7 +1812,7 @@ static void test_isemptyelement(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1823,7 +1823,7 @@ static void test_isemptyelement(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got %d\n", type);
ret = IXmlReader_IsEmptyElement(reader);
@@ -1867,7 +1867,7 @@ static void test_read_attribute(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1878,9 +1878,9 @@ static void test_read_attribute(void)
hr = IXmlReader_Read(reader, NULL);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1888,19 +1888,19 @@ static void test_read_attribute(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "Failed to get node type, %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got %d for %s\n", type, test->xml);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_name(reader, test->name);
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1921,23 +1921,23 @@ static void test_reader_properties(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_MaxElementDepth, &value);
- ok(hr == S_OK, "GetProperty failed: %08x\n", hr);
- ok(value == 256, "Unexpected default max depth value %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 256, "Unexpected default max depth value %Id.\n", value);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MultiLanguage, 0);
- ok(hr == S_OK, "SetProperty failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 0);
- ok(hr == S_OK, "SetProperty failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 256;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_MaxElementDepth, &value);
- ok(hr == S_OK, "GetProperty failed: %08x\n", hr);
- ok(value == 0, "Unexpected max depth value %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 0, "Unexpected max depth value %Id.\n", value);
IXmlReader_Release(reader);
}
@@ -1960,7 +1960,7 @@ static void test_prefix(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(prefix_tests); i++) {
XmlNodeType type;
@@ -1968,16 +1968,16 @@ static void test_prefix(void)
set_input_string(reader, prefix_tests[i].xml);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "Read() failed, %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix1);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "MoveToFirstAttribute() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "GetNodeType() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix2);
@@ -1985,7 +1985,7 @@ static void test_prefix(void)
next_attribute(reader);
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "GetNodeType() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix3);
@@ -2035,7 +2035,7 @@ static void test_namespaceuri(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(uri_tests); i++) {
unsigned int j = 0;
@@ -2059,13 +2059,13 @@ static void test_namespaceuri(void)
local = NULL;
length = 0;
hr = IXmlReader_GetLocalName(reader, &local, &length);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(local != NULL, "Unexpected NULL local name pointer\n");
qname = NULL;
length2 = 0;
hr = IXmlReader_GetQualifiedName(reader, &qname, &length2);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(qname != NULL, "Unexpected NULL qualified name pointer\n");
if (type == XmlNodeType_Element ||
@@ -2100,28 +2100,28 @@ static void test_read_charref(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, testA);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected node type %d\n", type);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Text, "Unexpected node type %d\n", type);
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(value, chardataW), "Text value : %s\n", wine_dbgstr_w(value));
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_EndElement, "Unexpected node type %d\n", type);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected node type %d\n", type);
IXmlReader_Release(reader);
@@ -2154,7 +2154,7 @@ static void test_encoding_detection(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* there's no way to query detected encoding back, so just verify that document is browsable */
@@ -2164,7 +2164,7 @@ static void test_encoding_detection(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type != XmlNodeType_None, "Unexpected node type %d\n", type);
}
@@ -2173,11 +2173,11 @@ static void test_encoding_detection(void)
stream = create_stream_on_data(encoding_testsW[i].text, lstrlenW(encoding_testsW[i].text) * sizeof(WCHAR));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "%u: got %08x\n", i, hr);
+ ok(hr == S_OK, "%u: unexpected hr %#lx.\n", i, hr);
ok(type != XmlNodeType_None, "%u: unexpected node type %d\n", i, type);
IStream_Release(stream);
@@ -2193,8 +2193,8 @@ static void test_eof_state(IXmlReader *reader, BOOL eof)
ok(IXmlReader_IsEOF(reader) == eof, "Unexpected IsEOF() result\n");
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_ReadState, &state);
- ok(hr == S_OK, "GetProperty() failed, %#x\n", hr);
- ok((state == XmlReadState_EndOfFile) == eof, "Unexpected EndOfFile state %ld\n", state);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok((state == XmlReadState_EndOfFile) == eof, "Unexpected EndOfFile state %Id.\n", state);
}
static void test_endoffile(void)
@@ -2204,7 +2204,7 @@ static void test_endoffile(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_eof_state(reader, FALSE);
@@ -2214,46 +2214,46 @@ static void test_endoffile(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected type %d\n", type);
test_eof_state(reader, TRUE);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_eof_state(reader, FALSE);
IXmlReader_Release(reader);
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<a/>text");
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == WC_E_SYNTAX, "got %#x\n", hr);
+ ok(hr == WC_E_SYNTAX, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IXmlReader_Release(reader);
}
@@ -2274,37 +2274,37 @@ static void test_max_element_depth(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 2);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 1);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 10);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
@@ -2313,34 +2313,34 @@ static void test_max_element_depth(void)
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 2);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 1);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 2);
TEST_READER_STATE(reader, XmlReadState_Interactive);
nodetype = 123;
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype);
nodetype = 123;
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype);
TEST_DEPTH2(reader, 0, 2);
@@ -2350,7 +2350,7 @@ static void test_max_element_depth(void)
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 0);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 0;
while (IXmlReader_Read(reader, NULL) == S_OK)
@@ -2370,25 +2370,25 @@ static void test_reader_position(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Closed);
/* position methods with Null args */
hr = IXmlReader_GetLineNumber(reader, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetLinePosition(reader, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
position = 123;
hr = IXmlReader_GetLinePosition(reader, &position);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(position == 0, "got %u\n", position);
position = 123;
hr = IXmlReader_GetLineNumber(reader, &position);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(position == 0, "got %u\n", position);
set_input_string(reader, xml);
@@ -2396,7 +2396,7 @@ static void test_reader_position(void)
TEST_READER_STATE(reader, XmlReadState_Initial);
TEST_READER_POSITION(reader, 0, 0);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got type %d\n", type);
TEST_READER_POSITION2(reader, 1, 2, ~0u, 34);
@@ -2410,17 +2410,17 @@ static void test_reader_position(void)
TEST_READER_POSITION2(reader, 1, 2, ~0u, 34);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Whitespace, "got type %d\n", type);
TEST_READER_POSITION2(reader, 1, 35, 2, 6);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_EndElement, "got type %d\n", type);
TEST_READER_POSITION2(reader, 2, 3, 2, 6);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
TEST_READER_POSITION(reader, 0, 0);
@@ -2434,7 +2434,7 @@ static void test_string_pointers(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<elem xmlns=\"myns\">myns<elem2 /></elem>");
@@ -2565,67 +2565,67 @@ static void test_attribute_by_name(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "Failed to create reader, hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, xml);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL);
- ok(hr == E_INVALIDARG || broken(hr == S_FALSE) /* WinXP */, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG || broken(hr == S_FALSE) /* WinXP */, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, xmlns_uriW);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, xmlns_uriW);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, xmlnsW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, xmlnsW, xmlns_uriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"myns");
hr = IXmlReader_MoveToAttributeByName(reader, aW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value a");
hr = IXmlReader_MoveToAttributeByName(reader, bW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, aW, mynsW);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, nsW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, nsW, xmlns_uriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"ns uri");
hr = IXmlReader_MoveToAttributeByName(reader, bW, emptyW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, cW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value c2");
hr = IXmlReader_MoveToAttributeByName(reader, cW, nsuriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value c");
IXmlReader_Release(reader);
diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c
index c69aa42598d..8d096b0d632 100644
--- a/dlls/xmllite/tests/writer.c
+++ b/dlls/xmllite/tests/writer.c
@@ -41,7 +41,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG refcount;
IUnknown_AddRef(obj);
refcount = IUnknown_Release(obj);
- ok_(__FILE__, line)(refcount == ref, "expected refcount %d, got %d\n", ref, refcount);
+ ok_(__FILE__, line)(refcount == ref, "expected refcount %lu, got %lu.\n", ref, refcount);
}
static void check_output_raw(IStream *stream, const void *expected, SIZE_T size, int line)
@@ -52,10 +52,10 @@ static void check_output_raw(IStream *stream, const void *expected, SIZE_T size,
WCHAR *ptr;
hr = GetHGlobalFromStream(stream, &hglobal);
- ok_(__FILE__, line)(hr == S_OK, "Failed to get the stream handle, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get the stream handle, hr %#lx.\n", hr);
content_size = GlobalSize(hglobal);
- ok_(__FILE__, line)(size == content_size, "Unexpected test output size %ld.\n", content_size);
+ ok_(__FILE__, line)(size == content_size, "Unexpected test output size %Id.\n", content_size);
ptr = GlobalLock(hglobal);
if (size <= content_size)
ok_(__FILE__, line)(!memcmp(expected, ptr, size), "Unexpected output content.\n");
@@ -73,7 +73,7 @@ static void check_output(IStream *stream, const char *expected, BOOL todo, int l
char *ptr;
hr = GetHGlobalFromStream(stream, &hglobal);
- ok_(__FILE__, line)(hr == S_OK, "got 0x%08x\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
size = GlobalSize(hglobal);
ptr = GlobalLock(hglobal);
@@ -111,7 +111,7 @@ static void writer_set_property(IXmlWriter *writer, XmlWriterProperty property)
HRESULT hr;
hr = IXmlWriter_SetProperty(writer, property, TRUE);
- ok(hr == S_OK, "Failed to set writer property, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set writer property, hr %#lx.\n", hr);
}
/* used to test all Write* methods for consistent error state */
@@ -123,67 +123,67 @@ static void check_writer_state(IXmlWriter *writer, HRESULT exp_hr)
/* FIXME: add WriteAttributes */
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteCharEntity(writer, aW[0]);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteChars(writer, aW, 1);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteDocType(writer, aW, NULL, NULL, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEntityRef(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
/* FIXME: add WriteNode */
/* FIXME: add WriteNodeShallow */
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteQualifiedName(writer, aW, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteRaw(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteRawChars(writer, aW, 1);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
/* FIXME: add WriteSurrogateCharEntity */
/* FIXME: add WriteWhitespace */
@@ -195,10 +195,10 @@ static IStream *writer_set_output(IXmlWriter *writer)
HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return stream;
}
@@ -295,39 +295,39 @@ static void test_writer_create(void)
}
hr = CreateXmlWriter(&IID_IStream, (void **)&unk, NULL);
- ok(hr == E_NOINTERFACE, "got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IUnknown, (void **)&unk, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IXmlWriter, (void **)&writer);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == (IUnknown *)writer, "unexpected interface pointer\n");
IUnknown_Release(unk);
IXmlWriter_Release(writer);
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* check default properties values */
value = 0;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_ByteOrderMark, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == TRUE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == TRUE, "got %Id.\n", value);
value = TRUE;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_Indent, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == FALSE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == FALSE, "got %Id.\n", value);
value = TRUE;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_OmitXmlDeclaration, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == FALSE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == FALSE, "got %Id.\n", value);
value = XmlConformanceLevel_Auto;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_ConformanceLevel, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == XmlConformanceLevel_Document, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == XmlConformanceLevel_Document, "got %Id.\n", value);
IXmlWriter_Release(writer);
}
@@ -337,78 +337,78 @@ static void test_invalid_output_encoding(IXmlWriter *writer, IUnknown *output)
HRESULT hr;
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "Failed to set output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set output, hr %#lx.\n", hr);
/* TODO: WriteAttributes */
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCharEntity(writer, 0x100);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteChars(writer, aW, 1);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteDocType(writer, aW, NULL, NULL, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEntityRef(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
/* TODO: WriteNode */
/* TODO: WriteNodeShallow */
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteQualifiedName(writer, aW, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRawChars(writer, aW, 1);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
/* TODO: WriteSurrogateCharEntity */
- /* ًُُTODO: WriteWhitespace */
+ /* TODO: WriteWhitespace */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
}
static void test_writeroutput(void)
@@ -425,15 +425,15 @@ static void test_writeroutput(void)
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, NULL, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(output, 1);
IUnknown_Release(output);
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
unk = NULL;
hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (void**)&unk);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(unk != NULL && unk != output, "got %p, output %p\n", unk, output);
EXPECT_REF(output, 2);
@@ -444,14 +444,14 @@ static void test_writeroutput(void)
output = NULL;
hr = CreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, ~0u, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(output);
hr = CreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, CP_UTF8, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
unk = NULL;
hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (void**)&unk);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != NULL, "got %p\n", unk);
/* releasing 'unk' crashes on native */
IUnknown_Release(output);
@@ -460,27 +460,27 @@ static void test_writeroutput(void)
/* create with us-ascii */
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, usasciiW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(output);
/* Output with codepage 1200. */
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create writer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer, hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Failed to create stream, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create stream, hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingCodePage((IUnknown *)stream, NULL, 1200, &output);
- ok(hr == S_OK, "Failed to create writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer output, hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "Failed to set writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set writer output, hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "Write failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Write failed, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, utf16_outputW, sizeof(utf16_outputW));
@@ -489,11 +489,11 @@ static void test_writeroutput(void)
/* Create output with meaningless code page value. */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Failed to create stream, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create stream, hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingCodePage((IUnknown *)stream, NULL, ~0u, &output);
- ok(hr == S_OK, "Failed to create writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer output, hr %#lx.\n", hr);
test_invalid_output_encoding(writer, output);
CHECK_OUTPUT(stream, "");
@@ -503,11 +503,11 @@ static void test_writeroutput(void)
/* Same, with invalid encoding name. */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName((IUnknown *)stream, NULL, dummyW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_invalid_output_encoding(writer, output);
CHECK_OUTPUT(stream, "");
@@ -532,55 +532,55 @@ static void test_writestartdocument(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* output not set */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
/* nothing written yet */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, fullprolog);
/* one more time */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
/* now add PI manually, and try to start a document */
stream = writer_set_output(writer);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
/* another attempt to add 'xml' PI */
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
@@ -589,23 +589,23 @@ static void test_writestartdocument(void)
/* create with us-ascii */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName((IUnknown *)stream, NULL, usasciiW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion2);
@@ -620,28 +620,28 @@ static void test_flush(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)&teststream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
g_write_len = 0;
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(g_write_len > 0, "got %d\n", g_write_len);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(g_write_len > 0, "Unexpected length %lu.\n", g_write_len);
g_write_len = 1;
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(g_write_len == 0, "got %d\n", g_write_len);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(g_write_len == 0, "Unexpected length %lu.\n", g_write_len);
/* Release() flushes too */
g_write_len = 1;
IXmlWriter_Release(writer);
- ok(g_write_len == 0, "got %d\n", g_write_len);
+ ok(g_write_len == 0, "Unexpected length %lu.\n", g_write_len);
}
static void test_omitxmldeclaration(void)
@@ -656,20 +656,20 @@ static void test_omitxmldeclaration(void)
char *ptr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ptr = GlobalLock(hglobal);
ok(!ptr, "got %p\n", ptr);
@@ -677,7 +677,7 @@ static void test_omitxmldeclaration(void)
/* one more time */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
@@ -685,35 +685,35 @@ static void test_omitxmldeclaration(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
/* another attempt to add 'xml' PI */
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
IXmlWriter_Release(writer);
@@ -735,25 +735,25 @@ static void test_bom(void)
HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* BOM is on by default */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, bomW, sizeof(bomW));
@@ -762,19 +762,19 @@ static void test_bom(void)
/* start with PI */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, piW, sizeof(piW));
@@ -783,19 +783,19 @@ static void test_bom(void)
/* start with element */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, aopenW, sizeof(aopenW));
@@ -804,24 +804,24 @@ static void test_bom(void)
/* WriteElementString */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, afullW, sizeof(afullW));
@@ -922,65 +922,65 @@ static void test_WriteStartElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a");
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
IXmlWriter_Release(writer);
/* WriteElementString */
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, "prefix", "a", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == S_OK, "Failed to write element string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element string, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "c", NULL, NULL);
- ok(hr == S_OK, "Failed to write element string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element string, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "d", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, "", "e", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, "prefix2", "f", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<prefix:a xmlns:prefix=\"uri\">"
@@ -1000,24 +1000,24 @@ static void test_WriteStartElement(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_start_element(writer, start_element_tests[i].prefix, start_element_tests[i].local,
start_element_tests[i].uri);
- ok(hr == start_element_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == start_element_tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(start_element_tests[i].hr))
{
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, start_element_tests[i].output_partial, start_element_tests[i].todo_partial, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, start_element_tests[i].output, start_element_tests[i].todo, __LINE__);
}
@@ -1072,54 +1072,54 @@ static void test_WriteElementString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "b", "uri", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, "prefix", "c", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "d", NULL, NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix2", "d", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "e", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "f", "uri2", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "g", "uri3", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "h", NULL, NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix_i", "i", NULL, NULL);
- ok(hr == WR_E_NSPREFIXWITHEMPTYNSURI, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == WR_E_NSPREFIXWITHEMPTYNSURI, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "", "j", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a><b>value</b><b />"
@@ -1142,24 +1142,24 @@ static void test_WriteElementString(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_element_string(writer, element_string_tests[i].prefix, element_string_tests[i].local,
element_string_tests[i].uri, element_string_tests[i].value);
- ok(hr == element_string_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == element_string_tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(element_string_tests[i].hr))
{
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, element_string_tests[i].output, element_string_tests[i].todo, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, element_string_tests[i].output, element_string_tests[i].todo, __LINE__);
}
@@ -1177,24 +1177,24 @@ static void test_WriteEndElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a><b /></a>");
@@ -1213,47 +1213,47 @@ static void test_writeenddocument(void)
char *ptr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
/* WriteEndDocument resets it to initial state */
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ptr = GlobalLock(hglobal);
ok(ptr == NULL, "got %p\n", ptr);
/* we still need to flush manually, WriteEndDocument doesn't do that */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a><b /></a>");
@@ -1271,35 +1271,35 @@ static void test_WriteComment(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, closeW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<!--a--><b><!--a--><!----><!--- ->-->");
@@ -1318,32 +1318,32 @@ static void test_WriteCData(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, closeW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, close2W);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>"
@@ -1367,48 +1367,48 @@ static void test_WriteRaw(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteRaw(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, rawW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>a<:a<:<!--a<:-->a<:<a>a</a>");
@@ -1424,7 +1424,7 @@ static void test_writer_state(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* initial state */
check_writer_state(writer, E_UNEXPECTED);
@@ -1433,7 +1433,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1442,7 +1442,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1451,7 +1451,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1460,7 +1460,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1469,7 +1469,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1478,7 +1478,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1487,7 +1487,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1496,7 +1496,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1514,7 +1514,7 @@ static void test_indentation(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
@@ -1522,22 +1522,22 @@ static void test_indentation(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, commentW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1551,19 +1551,19 @@ static void test_indentation(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1678,7 +1678,7 @@ static void test_WriteAttributeString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
@@ -1687,26 +1687,26 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "e", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_attribute_string(writer, attribute_tests[i].prefix, attribute_tests[i].local,
attribute_tests[i].uri, attribute_tests[i].value);
todo_wine_if(attribute_tests[i].todo_hr)
- ok(hr == attribute_tests[i].hr, "%u: unexpected hr %#x, expected %#x.\n", i, hr, attribute_tests[i].hr);
+ ok(hr == attribute_tests[i].hr, "%u: unexpected hr %#lx, expected %#lx.\n", i, hr, attribute_tests[i].hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, attribute_tests[i].output_partial, attribute_tests[i].todo_partial, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, attribute_tests[i].output, attribute_tests[i].todo, __LINE__);
IStream_Release(stream);
@@ -1716,41 +1716,41 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, "p", "a", "outeruri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "local", "uri", "b");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "a", NULL, "b");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "xmlns", "prefix", NULL, "uri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "p", "attr", NULL, "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "local", NULL, "b");
todo_wine
- ok(hr == WR_E_DUPLICATEATTRIBUTE, "got 0x%08x\n", hr);
+ ok(hr == WR_E_DUPLICATEATTRIBUTE, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "attr2", "outeruri", "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = write_attribute_string(writer, "pr", "attr3", "outeruri", "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_TODO(stream,
"<p:a prefix:local=\"b\" a=\"b\" xmlns:prefix=\"uri\" p:attr=\"value\" xmlns:p=\"outeruri\">"
@@ -1763,22 +1763,22 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "e", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "xmlns", "prefix", NULL, "uri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "attr", NULL, "value");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<e xmlns:prefix=\"uri\" prefix:attr=\"value\" />");
@@ -1796,7 +1796,7 @@ static void test_WriteFullEndElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* standalone element */
stream = writer_set_output(writer);
@@ -1805,19 +1805,19 @@ static void test_WriteFullEndElement(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a></a>");
@@ -1830,22 +1830,22 @@ static void test_WriteFullEndElement(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1864,7 +1864,7 @@ static void test_WriteCharEntity(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* without indentation */
stream = writer_set_output(writer);
@@ -1872,22 +1872,22 @@ static void test_WriteCharEntity(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCharEntity(writer, 0x100);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>Ā<a /></a>");
@@ -1903,39 +1903,39 @@ static void test_WriteString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = write_string(writer, "a");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "a");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* WriteString automatically escapes markup characters */
hr = write_string(writer, "<&\">=");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>a<&\">=");
@@ -1944,22 +1944,22 @@ static void test_WriteString(void)
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b");
hr = write_string(writer, "");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>");
@@ -1969,43 +1969,43 @@ static void test_WriteString(void)
/* With indentation */
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create a writer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a writer, hr %#lx.\n", hr);
stream = writer_set_output(writer);
writer_set_property(writer, XmlWriterProperty_Indent);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_string(writer, "text");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b>text");
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b>text</b>");
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2017,29 +2017,29 @@ static void test_WriteString(void)
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b />");
hr = write_start_element(writer, NULL, "c", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "attr", NULL, "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2047,10 +2047,10 @@ static void test_WriteString(void)
" <c attr=\"value\"");
hr = write_string(writer, "text");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2058,10 +2058,10 @@ static void test_WriteString(void)
" <c attr=\"value\">text");
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2069,16 +2069,16 @@ static void test_WriteString(void)
" <c attr=\"value\">text</c>");
hr = write_start_element(writer, NULL, "d", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2087,10 +2087,10 @@ static void test_WriteString(void)
" <d></d>");
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2163,23 +2163,23 @@ static void test_WriteDocType(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create writer instance, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer instance, hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteDocType(writer, NULL, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteDocType(writer, emptyW, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Name validation. */
hr = IXmlWriter_WriteDocType(writer, nameW, NULL, NULL, NULL);
- ok(hr == WC_E_NAMECHARACTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == WC_E_NAMECHARACTER, "Unexpected hr %#lx.\n", hr);
/* Pubid validation. */
hr = IXmlWriter_WriteDocType(writer, aW, pubidW, NULL, NULL);
- ok(hr == WC_E_PUBLICID, "Unexpected hr %#x.\n", hr);
+ ok(hr == WC_E_PUBLICID, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
@@ -2189,16 +2189,16 @@ static void test_WriteDocType(void)
hr = write_doctype(writer, doctype_tests[i].name, doctype_tests[i].pubid, doctype_tests[i].sysid,
doctype_tests[i].subset);
- ok(hr == S_OK, "%u: failed to write doctype, hr %#x.\n", i, hr);
+ ok(hr == S_OK, "%u: failed to write doctype, hr %#lx.\n", i, hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream, doctype_tests[i].output);
hr = write_doctype(writer, doctype_tests[i].name, doctype_tests[i].pubid, doctype_tests[i].sysid,
doctype_tests[i].subset);
- ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#x.\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
}
--
2.34.1
1
0
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/xmllite/tests/Makefile.in | 1 -
dlls/xmllite/tests/reader.c | 488 +++++++++++------------
dlls/xmllite/tests/writer.c | 694 ++++++++++++++++-----------------
3 files changed, 591 insertions(+), 592 deletions(-)
diff --git a/dlls/xmllite/tests/Makefile.in b/dlls/xmllite/tests/Makefile.in
index 1548dc50193..6a87e6663aa 100644
--- a/dlls/xmllite/tests/Makefile.in
+++ b/dlls/xmllite/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = xmllite.dll
IMPORTS = xmllite ole32
diff --git a/dlls/xmllite/tests/reader.c b/dlls/xmllite/tests/reader.c
index c4e53a5c40c..d0d2373aaf1 100644
--- a/dlls/xmllite/tests/reader.c
+++ b/dlls/xmllite/tests/reader.c
@@ -50,7 +50,7 @@ static IStream *create_stream_on_data(const void *data, unsigned int size)
memcpy(ptr, data, size);
hr = CreateStreamOnHGlobal(hglobal, TRUE, &stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(stream != NULL, "Expected non-NULL stream\n");
GlobalUnlock(hglobal);
@@ -209,7 +209,7 @@ static void _set_input_string(unsigned line, IXmlReader *reader, const char *xml
stream = create_stream_on_data(xml, strlen(xml));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok_(__FILE__,line)(hr == S_OK, "got %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
}
@@ -222,9 +222,9 @@ static void _read_node(unsigned line, IXmlReader *reader, XmlNodeType expected_t
hr = IXmlReader_Read(reader, &type);
if (expected_type == XmlNodeType_None)
- ok_(__FILE__,line)(hr == S_FALSE, "Read returned %08x, expected S_FALSE\n", hr);
+ ok_(__FILE__,line)(hr == S_FALSE, "Read returned %#lx, expected S_FALSE.\n", hr);
else
- ok_(__FILE__,line)(hr == S_OK, "Read returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Read returned %#lx.\n", hr);
ok_(__FILE__,line)(type == expected_type, "read type %d, expected %d\n", type, expected_type);
}
@@ -233,7 +233,7 @@ static void _next_attribute(unsigned line, IXmlReader *reader)
{
HRESULT hr;
hr = IXmlReader_MoveToNextAttribute(reader);
- ok_(__FILE__,line)(hr == S_OK, "MoveToNextAttribute returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
#define move_to_element(a) _move_to_element(__LINE__,a)
@@ -241,7 +241,7 @@ static void _move_to_element(unsigned line, IXmlReader *reader)
{
HRESULT hr;
hr = IXmlReader_MoveToElement(reader);
- ok_(__FILE__,line)(hr == S_OK, "MoveToElement failed: %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
}
static void test_read_state(IXmlReader *reader, XmlReadState expected,
@@ -269,11 +269,11 @@ static void test_read_state(IXmlReader *reader, XmlReadState expected,
static const WCHAR *_reader_value(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetValue(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetValue returned %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "value = %s\n", wine_dbgstr_w(str));
return str;
@@ -283,12 +283,12 @@ static const WCHAR *_reader_value(unsigned line, IXmlReader *reader, const WCHAR
static const WCHAR *_reader_name(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetLocalName(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetLocalName returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "name = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -297,12 +297,12 @@ static const WCHAR *_reader_name(unsigned line, IXmlReader *reader, const WCHAR
static const WCHAR *_reader_prefix(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetPrefix(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetPrefix returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "prefix = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -311,12 +311,12 @@ static const WCHAR *_reader_prefix(unsigned line, IXmlReader *reader, const WCHA
static const WCHAR *_reader_namespace(unsigned line, IXmlReader *reader, const WCHAR *expect)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetNamespaceUri(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetNamespaceUri returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "namespace = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -325,12 +325,12 @@ static const WCHAR *_reader_namespace(unsigned line, IXmlReader *reader, const W
static const WCHAR *_reader_qname(IXmlReader *reader, const WCHAR *expect, unsigned line)
{
const WCHAR *str = (void*)0xdeadbeef;
- ULONG len = 0xdeadbeef;
+ UINT len = 0xdeadbeef;
HRESULT hr;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok_(__FILE__,line)(hr == S_OK, "GetQualifiedName returned %08x\n", hr);
- ok_(__FILE__,line)(len == lstrlenW(str), "len = %u\n", len);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok_(__FILE__,line)(len == lstrlenW(str), "len = %u.\n", len);
ok_(__FILE__,line)(!lstrcmpW(str, expect), "name = %s\n", wine_dbgstr_w(str));
return str;
}
@@ -343,7 +343,7 @@ static void _read_value_char(IXmlReader *reader, WCHAR expected_char, unsigned l
HRESULT hr;
hr = IXmlReader_ReadValueChunk(reader, &c, 1, &count);
- ok_(__FILE__,line)(hr == S_OK, "got %08x\n", hr);
+ ok_(__FILE__,line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_(__FILE__,line)(count == 1, "got %u\n", c);
ok_(__FILE__,line)(c == expected_char, "got %x\n", c);
}
@@ -528,84 +528,84 @@ static void test_reader_create(void)
}
hr = CreateXmlReader(&IID_IStream, (void **)&unk, NULL);
- ok(hr == E_NOINTERFACE, "got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlReader(&IID_IUnknown, (void **)&unk, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IXmlReader, (void **)&reader);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == (IUnknown *)reader, "unexpected interface\n");
IXmlReader_Release(reader);
IUnknown_Release(unk);
hr = CreateXmlReader(&IID_IUnknown, (void **)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IXmlReader_Release(reader);
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Closed);
nodetype = XmlNodeType_Element;
hr = IXmlReader_GetNodeType(reader, &nodetype);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got %d\n", nodetype);
/* crashes on XP, 2k3, works on newer versions */
if (0)
{
hr = IXmlReader_GetNodeType(reader, NULL);
- ok(hr == E_INVALIDARG, "got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
}
resolver = (void*)0xdeadbeef;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR*)&resolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(resolver == NULL, "got %p\n", resolver);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR)&testresolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
resolver = NULL;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_XmlResolver, (LONG_PTR*)&resolver);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(resolver == &testresolver, "got %p\n", resolver);
IXmlResolver_Release(resolver);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_XmlResolver, 0);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
dtd = 2;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_DtdProcessing, (LONG_PTR*)&dtd);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(dtd == DtdProcessing_Prohibit, "got %d\n", dtd);
dtd = 2;
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, dtd);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, -1);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Null input pointer, releases previous input */
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
/* test input interface selection sequence */
hr = testinput_createinstance((void**)&input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
{
input_iids.count = 0;
hr = IXmlReader_SetInput(reader, input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_full, setinput_full_old, FALSE);
IUnknown_Release(input);
}
@@ -623,71 +623,71 @@ static void test_readerinput(void)
LONG ref;
hr = CreateXmlReaderInputWithEncodingName(NULL, NULL, NULL, FALSE, NULL, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlReaderInputWithEncodingName(NULL, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IStream_AddRef(stream);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IStream_Release(stream);
hr = CreateXmlReaderInputWithEncodingName((IUnknown*)stream, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(reader_input, &IID_IStream, (void**)&stream2);
- ok(hr == E_NOINTERFACE, "Expected S_OK, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(reader_input, &IID_ISequentialStream, (void**)&stream2);
- ok(hr == E_NOINTERFACE, "Expected S_OK, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
/* IXmlReaderInput grabs a stream reference */
ref = IStream_AddRef(stream);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IStream_Release(stream);
/* try ::SetInput() with valid IXmlReaderInput */
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Initial);
nodetype = XmlNodeType_Element;
hr = IXmlReader_GetNodeType(reader, &nodetype);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got %d\n", nodetype);
/* IXmlReader grabs a IXmlReaderInput reference */
ref = IUnknown_AddRef(reader_input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
ref = IStream_AddRef(stream);
- ok(ref == 4, "Expected 4, got %d\n", ref);
+ ok(ref == 4, "Expected 4, got %ld.\n", ref);
IStream_Release(stream);
/* reset input and check state */
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
IXmlReader_Release(reader);
ref = IStream_AddRef(stream);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IStream_Release(stream);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
/* IID_IXmlReaderInput */
@@ -696,9 +696,9 @@ static void test_readerinput(void)
Such query will be used only to check if input is really IXmlReaderInput */
obj = (IUnknown*)0xdeadbeef;
hr = IUnknown_QueryInterface(reader_input, &IID_IXmlReaderInput, (void**)&obj);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IUnknown_AddRef(reader_input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
IUnknown_Release(reader_input);
@@ -708,59 +708,59 @@ static void test_readerinput(void)
/* test input interface selection sequence */
input = NULL;
hr = testinput_createinstance((void**)&input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_iids.count = 0;
ref = IUnknown_AddRef(input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(input);
hr = CreateXmlReaderInputWithEncodingName(input, NULL, NULL, FALSE, NULL, &reader_input);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, empty_seq, NULL, FALSE);
/* IXmlReaderInput stores stream interface as IUnknown */
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
input_iids.count = 0;
ref = IUnknown_AddRef(reader_input);
- ok(ref == 2, "Expected 2, got %d\n", ref);
+ ok(ref == 2, "Expected 2, got %ld.\n", ref);
IUnknown_Release(reader_input);
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
TEST_READER_STATE(reader, XmlReadState_Closed);
ref = IUnknown_AddRef(input);
- ok(ref == 3, "Expected 3, got %d\n", ref);
+ ok(ref == 3, "Expected 3, got %ld.\n", ref);
IUnknown_Release(input);
ref = IUnknown_AddRef(reader_input);
ok(ref == 3 || broken(ref == 2) /* versions 1.0.x and 1.1.x - XP, Vista */,
- "Expected 3, got %d\n", ref);
+ "Expected 3, got %ld.\n", ref);
IUnknown_Release(reader_input);
/* repeat another time, no check or caching here */
input_iids.count = 0;
hr = IXmlReader_SetInput(reader, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
/* another reader */
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader2, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* resolving from IXmlReaderInput to IStream/ISequentialStream is done at
::SetInput() level, each time it's called */
input_iids.count = 0;
hr = IXmlReader_SetInput(reader2, reader_input);
- ok(hr == E_NOINTERFACE, "Expected E_NOINTERFACE, got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
ok_iids(&input_iids, setinput_readerinput, NULL, FALSE);
IXmlReader_Release(reader2);
@@ -777,11 +777,11 @@ static void test_reader_state(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* invalid arguments */
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_ReadState, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* attempt to read on closed reader */
TEST_READER_STATE(reader, XmlReadState_Closed);
@@ -790,7 +790,7 @@ if (0)
{
/* newer versions crash here, probably because no input was set */
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
}
set_input_string(reader, "xml");
TEST_READER_STATE(reader, XmlReadState_Initial);
@@ -798,7 +798,7 @@ if (0)
nodetype = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &nodetype);
todo_wine
- ok(FAILED(hr), "got %08x\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "Unexpected node type %d\n", nodetype);
todo_wine
@@ -807,7 +807,7 @@ if (0)
nodetype = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &nodetype);
todo_wine
- ok(FAILED(hr), "got %08x\n", hr);
+ ok(FAILED(hr), "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "Unexpected node type %d\n", nodetype);
IXmlReader_Release(reader);
@@ -850,26 +850,26 @@ static void test_read_xmldeclaration(void)
const WCHAR *val;
hr = CreateXmlReader(&IID_IXmlReader, (LPVOID*)&reader, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = create_stream_on_data(xmldecl_full, sizeof(xmldecl_full));
hr = IXmlReader_SetInput(reader, (IUnknown*)stream);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "got %d\n", count);
/* try to move without attributes */
hr = IXmlReader_MoveToElement(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
TEST_READER_POSITION(reader, 0, 0);
@@ -890,7 +890,7 @@ static void test_read_xmldeclaration(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 55);
@@ -899,40 +899,40 @@ static void test_read_xmldeclaration(void)
next_attribute(reader);
next_attribute(reader);
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 55);
hr = IXmlReader_GetAttributeCount(reader, NULL);
- ok(hr == E_INVALIDARG, "got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 3, "Expected 3, got %d\n", count);
for (i = 0; i < count; i++)
{
len = 0;
hr = IXmlReader_GetLocalName(reader, &val, &len);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(name_val[i].name), "expected %u, got %u\n", lstrlenW(name_val[i].name), len);
ok(!lstrcmpW(name_val[i].name, val), "expected %s, got %s\n", wine_dbgstr_w(name_val[i].name), wine_dbgstr_w(val));
len = 0;
hr = IXmlReader_GetValue(reader, &val, &len);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(name_val[i].val), "expected %u, got %u\n", lstrlenW(name_val[i].val), len);
ok(!lstrcmpW(name_val[i].val, val), "expected %s, got %s\n", wine_dbgstr_w(name_val[i].val), wine_dbgstr_w(val));
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == ((i < count - 1) ? S_OK : S_FALSE), "got %08x\n", hr);
+ ok(hr == ((i < count - 1) ? S_OK : S_FALSE), "Unexpected hr %#lx.\n", hr);
}
TEST_DEPTH(reader, 1);
@@ -942,7 +942,7 @@ static void test_read_xmldeclaration(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_XmlDeclaration, "got %d\n", type);
type = XmlNodeType_XmlDeclaration;
@@ -950,7 +950,7 @@ static void test_read_xmldeclaration(void)
/* newer versions return syntax error here cause document is incomplete,
it makes more sense than invalid char error */
todo_wine {
- ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "got 0x%08x\n", hr);
+ ok(hr == WC_E_SYNTAX || broken(hr == WC_E_XMLCHARACTER), "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "got %d\n", type);
}
IStream_Release(stream);
@@ -959,14 +959,14 @@ todo_wine {
stream = create_stream_on_data(xmldecl_short, sizeof(xmldecl_short));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_XmlDeclaration);
TEST_READER_POSITION2(reader, 1, 3, ~0u, 21);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "expected 1, got %d\n", count);
ret = IXmlReader_IsEmptyElement(reader);
@@ -982,20 +982,20 @@ todo_wine {
type = -1;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
TEST_READER_POSITION2(reader, 1, 7, ~0u, 21);
/* try to move from last attribute */
hr = IXmlReader_MoveToNextAttribute(reader);
- ok(hr == S_FALSE, "expected S_FALSE, got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
TEST_READER_POSITION2(reader, 1, 23, ~0u, 40);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "expected 0, got %d\n", count);
ret = IXmlReader_IsEmptyElement(reader);
@@ -1007,7 +1007,7 @@ todo_wine {
type = -1;
hr = IXmlReader_Read(reader, &type);
todo_wine
- ok(hr == WC_E_SYNTAX || hr == WC_E_XMLCHARACTER /* XP */, "expected WC_E_SYNTAX, got %08x\n", hr);
+ ok(hr == WC_E_SYNTAX || hr == WC_E_XMLCHARACTER /* XP */, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "expected XmlNodeType_None, got %s\n", type_to_str(type));
TEST_READER_POSITION(reader, 1, 41);
todo_wine
@@ -1053,7 +1053,7 @@ static void test_read_comment(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, teststr);
@@ -1066,7 +1066,7 @@ static void test_read_comment(void)
if (type == XmlNodeType_Text || type == XmlNodeType_Comment)
{
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*value != 0, "Expected node value\n");
}
i++;
@@ -1079,9 +1079,9 @@ static void test_read_comment(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1092,14 +1092,14 @@ static void test_read_comment(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
reader_qname(reader, L"");
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1134,7 +1134,7 @@ static void test_read_pi(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1145,9 +1145,9 @@ static void test_read_pi(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1160,7 +1160,7 @@ static void test_read_pi(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1230,7 +1230,7 @@ static void test_read_full(void)
int i;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test->xml);
@@ -1257,10 +1257,10 @@ static void test_read_public_dtd(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, DtdProcessing_Parse);
- ok(hr == S_OK, "got 0x%8x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test_public_dtd);
@@ -1268,15 +1268,15 @@ static void test_read_public_dtd(void)
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 2, "got %d\n", count);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"PUBLIC");
@@ -1286,7 +1286,7 @@ static void test_read_public_dtd(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"SYSTEM");
@@ -1298,7 +1298,7 @@ static void test_read_public_dtd(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine {
ok(len == lstrlenW(dtdnameW), "got %u\n", len);
ok(!lstrcmpW(str, dtdnameW), "got %s\n", wine_dbgstr_w(str));
@@ -1320,10 +1320,10 @@ static void test_read_system_dtd(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_DtdProcessing, DtdProcessing_Parse);
- ok(hr == S_OK, "got 0x%8x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, test_system_dtd);
@@ -1331,15 +1331,15 @@ static void test_read_system_dtd(void)
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 1, "got %d\n", count);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "got %d\n", type);
reader_name(reader, L"SYSTEM");
@@ -1351,7 +1351,7 @@ static void test_read_system_dtd(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine {
ok(len == lstrlenW(dtdnameW), "got %u\n", len);
ok(!lstrcmpW(str, dtdnameW), "got %s\n", wine_dbgstr_w(str));
@@ -1397,7 +1397,7 @@ static void test_read_element(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1406,10 +1406,10 @@ static void test_read_element(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
todo_wine_if(test->hr == NC_E_UNDECLAREDPREFIX)
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1420,7 +1420,7 @@ static void test_read_element(void)
len = 0;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1444,7 +1444,7 @@ static void test_read_element(void)
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i], "%u: got depth %u, expected %u\n", i, depth, depths[i]);
if (type == XmlNodeType_Element || type == XmlNodeType_EndElement)
@@ -1453,7 +1453,7 @@ static void test_read_element(void)
prefix = NULL;
hr = IXmlReader_GetPrefix(reader, &prefix, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(prefix != NULL, "got %p\n", prefix);
if (!*prefix)
@@ -1462,12 +1462,12 @@ static void test_read_element(void)
local = NULL;
hr = IXmlReader_GetLocalName(reader, &local, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(local != NULL, "got %p\n", local);
qname = NULL;
hr = IXmlReader_GetQualifiedName(reader, &qname, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(qname != NULL, "got %p\n", qname);
ok(local == qname, "expected same pointer\n");
@@ -1478,7 +1478,7 @@ static void test_read_element(void)
{
count = 1;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(count == 0, "got %u\n", count);
}
@@ -1486,7 +1486,7 @@ static void test_read_element(void)
{
count = 0;
hr = IXmlReader_GetAttributeCount(reader, &count);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* moving to attributes increases depth */
if (count)
@@ -1496,14 +1496,14 @@ static void test_read_element(void)
reader_value(reader, L"");
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetValue(reader, &value, NULL);
ok(*value != 0, "Unexpected value %s\n", wine_dbgstr_w(value));
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i] + 1, "%u: got depth %u, expected %u\n", i, depth, depths[i] + 1);
move_to_element(reader);
@@ -1511,7 +1511,7 @@ static void test_read_element(void)
depth = 123;
hr = IXmlReader_GetDepth(reader, &depth);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(depth == depths[i], "%u: got depth %u, expected %u\n", i, depth, depths[i]);
}
}
@@ -1526,7 +1526,7 @@ static void test_read_element(void)
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == WC_E_ELEMENTMATCH, "got %08x\n", hr);
+ ok(hr == WC_E_ELEMENTMATCH, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "got %d\n", type);
TEST_READER_STATE(reader, XmlReadState_Error);
@@ -1544,16 +1544,16 @@ static void test_read_pending(void)
int c;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetInput(reader, (IUnknown*)&teststream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* first read call returns incomplete node, second attempt fails with E_PENDING */
stream_readcall = 0;
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK || broken(hr == E_PENDING), "got 0x%08x\n", hr);
+ ok(hr == S_OK || broken(hr == E_PENDING), "Unexpected hr %#lx.\n", hr);
/* newer versions are happy when it's enough data to detect node type,
older versions keep reading until it fails to read more */
todo_wine
@@ -1564,7 +1564,7 @@ static void test_read_pending(void)
c = stream_readcall;
value = (void*)0xdeadbeef;
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == E_PENDING, "got 0x%08x\n", hr);
+ ok(hr == E_PENDING, "Unexpected hr %#lx.\n", hr);
ok(value == NULL || broken(value == (void*)0xdeadbeef) /* Win8 sets it to NULL */, "got %p\n", value);
ok(c < stream_readcall || broken(c == stream_readcall), "got %d, expected %d\n", stream_readcall, c+1);
@@ -1581,12 +1581,12 @@ static void test_readvaluechunk(void)
UINT c;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<!-- comment1 --><!-- comment2 -->");
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Comment, "type = %u\n", type);
read_value_char(reader, ' ');
@@ -1599,13 +1599,13 @@ static void test_readvaluechunk(void)
c = 0;
b = 0;
hr = IXmlReader_ReadValueChunk(reader, &b, 1, &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(c == 0, "got %u\n", c);
ok(b == 0, "got %x\n", b);
c = 0xdeadbeef;
hr = IXmlReader_ReadValueChunk(reader, buf, 0, &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!c, "c = %u\n", c);
reader_value(reader, L"omment1 ");
@@ -1615,13 +1615,13 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
hr = IXmlReader_ReadValueChunk(reader, buf, 0, &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!c, "c = %u\n", c);
c = 0xdeadbeef;
memset(buf, 0xcc, sizeof(buf));
hr = IXmlReader_ReadValueChunk(reader, buf, ARRAY_SIZE(buf), &c);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(c == 10, "got %u\n", c);
ok(buf[c] == 0xcccc, "buffer overflow\n");
buf[c] = 0;
@@ -1630,7 +1630,7 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
memset(buf, 0xcc, sizeof(buf));
hr = IXmlReader_ReadValueChunk(reader, buf, ARRAY_SIZE(buf), &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(!c, "got %u\n", c);
/* portion read as chunk is skipped from resulting node value */
@@ -1640,7 +1640,7 @@ static void test_readvaluechunk(void)
c = 0xdeadbeef;
b = 0xffff;
hr = IXmlReader_ReadValueChunk(reader, &b, 1, &c);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(c == 0, "got %u\n", c);
ok(b == 0xffff, "got %x\n", b);
@@ -1666,7 +1666,7 @@ static void test_read_cdata(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1685,9 +1685,9 @@ static void test_read_cdata(void)
}
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1699,19 +1699,19 @@ static void test_read_cdata(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == 0, "got %u\n", len);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1740,7 +1740,7 @@ static void test_read_text(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1757,7 +1757,7 @@ static void test_read_text(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
}
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1769,19 +1769,19 @@ static void test_read_text(void)
str = NULL;
hr = IXmlReader_GetLocalName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == 0, "got %u\n", len);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(*str == 0, "got %s\n", wine_dbgstr_w(str));
/* value */
@@ -1812,7 +1812,7 @@ static void test_isemptyelement(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1823,7 +1823,7 @@ static void test_isemptyelement(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got %d\n", type);
ret = IXmlReader_IsEmptyElement(reader);
@@ -1867,7 +1867,7 @@ static void test_read_attribute(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
while (test->xml)
{
@@ -1878,9 +1878,9 @@ static void test_read_attribute(void)
hr = IXmlReader_Read(reader, NULL);
if (test->hr_broken)
- ok(hr == test->hr || broken(hr == test->hr_broken), "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr || broken(hr == test->hr_broken), "Unexpected hr %#lx, for %s.\n", hr, test->xml);
else
- ok(hr == test->hr, "got %08x for %s\n", hr, test->xml);
+ ok(hr == test->hr, "Unexpected hr %#lx, for %s.\n", hr, test->xml);
if (hr == S_OK)
{
const WCHAR *str;
@@ -1888,19 +1888,19 @@ static void test_read_attribute(void)
type = XmlNodeType_None;
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "Failed to get node type, %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got %d for %s\n", type, test->xml);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_name(reader, test->name);
len = 1;
str = NULL;
hr = IXmlReader_GetQualifiedName(reader, &str, &len);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(len == lstrlenW(test->name), "got %u\n", len);
ok(!lstrcmpW(str, test->name), "got %s\n", wine_dbgstr_w(str));
@@ -1921,23 +1921,23 @@ static void test_reader_properties(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 0;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_MaxElementDepth, &value);
- ok(hr == S_OK, "GetProperty failed: %08x\n", hr);
- ok(value == 256, "Unexpected default max depth value %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 256, "Unexpected default max depth value %Id.\n", value);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MultiLanguage, 0);
- ok(hr == S_OK, "SetProperty failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 0);
- ok(hr == S_OK, "SetProperty failed: %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
value = 256;
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_MaxElementDepth, &value);
- ok(hr == S_OK, "GetProperty failed: %08x\n", hr);
- ok(value == 0, "Unexpected max depth value %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == 0, "Unexpected max depth value %Id.\n", value);
IXmlReader_Release(reader);
}
@@ -1960,7 +1960,7 @@ static void test_prefix(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(prefix_tests); i++) {
XmlNodeType type;
@@ -1968,16 +1968,16 @@ static void test_prefix(void)
set_input_string(reader, prefix_tests[i].xml);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "Read() failed, %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix1);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "MoveToFirstAttribute() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "GetNodeType() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix2);
@@ -1985,7 +1985,7 @@ static void test_prefix(void)
next_attribute(reader);
hr = IXmlReader_GetNodeType(reader, &type);
- ok(hr == S_OK, "GetNodeType() failed, %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Attribute, "Unexpected node type %d.\n", type);
reader_prefix(reader, prefix_tests[i].prefix3);
@@ -2035,7 +2035,7 @@ static void test_namespaceuri(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void**)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
for (i = 0; i < ARRAY_SIZE(uri_tests); i++) {
unsigned int j = 0;
@@ -2059,13 +2059,13 @@ static void test_namespaceuri(void)
local = NULL;
length = 0;
hr = IXmlReader_GetLocalName(reader, &local, &length);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(local != NULL, "Unexpected NULL local name pointer\n");
qname = NULL;
length2 = 0;
hr = IXmlReader_GetQualifiedName(reader, &qname, &length2);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(qname != NULL, "Unexpected NULL qualified name pointer\n");
if (type == XmlNodeType_Element ||
@@ -2100,28 +2100,28 @@ static void test_read_charref(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, testA);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected node type %d\n", type);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Text, "Unexpected node type %d\n", type);
hr = IXmlReader_GetValue(reader, &value, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(!lstrcmpW(value, chardataW), "Text value : %s\n", wine_dbgstr_w(value));
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_EndElement, "Unexpected node type %d\n", type);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_FALSE, "got %08x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected node type %d\n", type);
IXmlReader_Release(reader);
@@ -2154,7 +2154,7 @@ static void test_encoding_detection(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* there's no way to query detected encoding back, so just verify that document is browsable */
@@ -2164,7 +2164,7 @@ static void test_encoding_detection(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type != XmlNodeType_None, "Unexpected node type %d\n", type);
}
@@ -2173,11 +2173,11 @@ static void test_encoding_detection(void)
stream = create_stream_on_data(encoding_testsW[i].text, lstrlenW(encoding_testsW[i].text) * sizeof(WCHAR));
hr = IXmlReader_SetInput(reader, (IUnknown *)stream);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "%u: got %08x\n", i, hr);
+ ok(hr == S_OK, "%u: unexpected hr %#lx.\n", i, hr);
ok(type != XmlNodeType_None, "%u: unexpected node type %d\n", i, type);
IStream_Release(stream);
@@ -2193,8 +2193,8 @@ static void test_eof_state(IXmlReader *reader, BOOL eof)
ok(IXmlReader_IsEOF(reader) == eof, "Unexpected IsEOF() result\n");
hr = IXmlReader_GetProperty(reader, XmlReaderProperty_ReadState, &state);
- ok(hr == S_OK, "GetProperty() failed, %#x\n", hr);
- ok((state == XmlReadState_EndOfFile) == eof, "Unexpected EndOfFile state %ld\n", state);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok((state == XmlReadState_EndOfFile) == eof, "Unexpected EndOfFile state %Id.\n", state);
}
static void test_endoffile(void)
@@ -2204,7 +2204,7 @@ static void test_endoffile(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_eof_state(reader, FALSE);
@@ -2214,46 +2214,46 @@ static void test_endoffile(void)
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected type %d\n", type);
test_eof_state(reader, TRUE);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_eof_state(reader, FALSE);
IXmlReader_Release(reader);
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<a/>text");
type = XmlNodeType_None;
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %#x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
type = XmlNodeType_Element;
hr = IXmlReader_Read(reader, &type);
- ok(hr == WC_E_SYNTAX, "got %#x\n", hr);
+ ok(hr == WC_E_SYNTAX, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_None, "Unexpected type %d\n", type);
test_eof_state(reader, FALSE);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IXmlReader_Release(reader);
}
@@ -2274,37 +2274,37 @@ static void test_max_element_depth(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 2);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 1);
TEST_READER_STATE(reader, XmlReadState_Interactive);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 10);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH2(reader, 0, 2);
TEST_READER_STATE(reader, XmlReadState_Error);
@@ -2313,34 +2313,34 @@ static void test_max_element_depth(void)
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 2);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 0);
hr = IXmlReader_Read(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 1);
hr = IXmlReader_MoveToFirstAttribute(reader);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_DEPTH(reader, 2);
TEST_READER_STATE(reader, XmlReadState_Interactive);
nodetype = 123;
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype);
nodetype = 123;
hr = IXmlReader_Read(reader, &nodetype);
- ok(hr == SC_E_MAXELEMENTDEPTH, "got %08x\n", hr);
+ ok(hr == SC_E_MAXELEMENTDEPTH, "Unexpected hr %#lx.\n", hr);
ok(nodetype == XmlNodeType_None, "got node type %d\n", nodetype);
TEST_DEPTH2(reader, 0, 2);
@@ -2350,7 +2350,7 @@ static void test_max_element_depth(void)
set_input_string(reader, xml);
hr = IXmlReader_SetProperty(reader, XmlReaderProperty_MaxElementDepth, 0);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
count = 0;
while (IXmlReader_Read(reader, NULL) == S_OK)
@@ -2370,25 +2370,25 @@ static void test_reader_position(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE(reader, XmlReadState_Closed);
/* position methods with Null args */
hr = IXmlReader_GetLineNumber(reader, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_GetLinePosition(reader, NULL);
- ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
position = 123;
hr = IXmlReader_GetLinePosition(reader, &position);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(position == 0, "got %u\n", position);
position = 123;
hr = IXmlReader_GetLineNumber(reader, &position);
- ok(hr == S_FALSE, "got %#x\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
ok(position == 0, "got %u\n", position);
set_input_string(reader, xml);
@@ -2396,7 +2396,7 @@ static void test_reader_position(void)
TEST_READER_STATE(reader, XmlReadState_Initial);
TEST_READER_POSITION(reader, 0, 0);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Element, "got type %d\n", type);
TEST_READER_POSITION2(reader, 1, 2, ~0u, 34);
@@ -2410,17 +2410,17 @@ static void test_reader_position(void)
TEST_READER_POSITION2(reader, 1, 2, ~0u, 34);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_Whitespace, "got type %d\n", type);
TEST_READER_POSITION2(reader, 1, 35, 2, 6);
hr = IXmlReader_Read(reader, &type);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(type == XmlNodeType_EndElement, "got type %d\n", type);
TEST_READER_POSITION2(reader, 2, 3, 2, 6);
hr = IXmlReader_SetInput(reader, NULL);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
TEST_READER_STATE2(reader, XmlReadState_Initial, XmlReadState_Closed);
TEST_READER_POSITION(reader, 0, 0);
@@ -2434,7 +2434,7 @@ static void test_string_pointers(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, "<elem xmlns=\"myns\">myns<elem2 /></elem>");
@@ -2565,67 +2565,67 @@ static void test_attribute_by_name(void)
HRESULT hr;
hr = CreateXmlReader(&IID_IXmlReader, (void **)&reader, NULL);
- ok(hr == S_OK, "Failed to create reader, hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
set_input_string(reader, xml);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL);
- ok(hr == E_INVALIDARG || broken(hr == S_FALSE) /* WinXP */, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG || broken(hr == S_FALSE) /* WinXP */, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, xmlns_uriW);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, emptyW, xmlns_uriW);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, xmlnsW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, xmlnsW, xmlns_uriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"myns");
hr = IXmlReader_MoveToAttributeByName(reader, aW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value a");
hr = IXmlReader_MoveToAttributeByName(reader, bW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, aW, mynsW);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, nsW, NULL);
- ok(hr == S_FALSE, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
hr = IXmlReader_MoveToAttributeByName(reader, nsW, xmlns_uriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"ns uri");
hr = IXmlReader_MoveToAttributeByName(reader, bW, emptyW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, cW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value c2");
hr = IXmlReader_MoveToAttributeByName(reader, cW, nsuriW);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
reader_value(reader, L"value c");
IXmlReader_Release(reader);
diff --git a/dlls/xmllite/tests/writer.c b/dlls/xmllite/tests/writer.c
index c69aa42598d..bfcea5d15de 100644
--- a/dlls/xmllite/tests/writer.c
+++ b/dlls/xmllite/tests/writer.c
@@ -41,7 +41,7 @@ static void _expect_ref(IUnknown *obj, ULONG ref, int line)
ULONG refcount;
IUnknown_AddRef(obj);
refcount = IUnknown_Release(obj);
- ok_(__FILE__, line)(refcount == ref, "expected refcount %d, got %d\n", ref, refcount);
+ ok_(__FILE__, line)(refcount == ref, "expected refcount %lu, got %lu.\n", ref, refcount);
}
static void check_output_raw(IStream *stream, const void *expected, SIZE_T size, int line)
@@ -52,10 +52,10 @@ static void check_output_raw(IStream *stream, const void *expected, SIZE_T size,
WCHAR *ptr;
hr = GetHGlobalFromStream(stream, &hglobal);
- ok_(__FILE__, line)(hr == S_OK, "Failed to get the stream handle, hr %#x.\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Failed to get the stream handle, hr %#lx.\n", hr);
content_size = GlobalSize(hglobal);
- ok_(__FILE__, line)(size == content_size, "Unexpected test output size %ld.\n", content_size);
+ ok_(__FILE__, line)(size == content_size, "Unexpected test output size %Id.\n", content_size);
ptr = GlobalLock(hglobal);
if (size <= content_size)
ok_(__FILE__, line)(!memcmp(expected, ptr, size), "Unexpected output content.\n");
@@ -73,7 +73,7 @@ static void check_output(IStream *stream, const char *expected, BOOL todo, int l
char *ptr;
hr = GetHGlobalFromStream(stream, &hglobal);
- ok_(__FILE__, line)(hr == S_OK, "got 0x%08x\n", hr);
+ ok_(__FILE__, line)(hr == S_OK, "Unexpected hr %#lx.\n", hr);
size = GlobalSize(hglobal);
ptr = GlobalLock(hglobal);
@@ -111,7 +111,7 @@ static void writer_set_property(IXmlWriter *writer, XmlWriterProperty property)
HRESULT hr;
hr = IXmlWriter_SetProperty(writer, property, TRUE);
- ok(hr == S_OK, "Failed to set writer property, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set writer property, hr %#lx.\n", hr);
}
/* used to test all Write* methods for consistent error state */
@@ -123,67 +123,67 @@ static void check_writer_state(IXmlWriter *writer, HRESULT exp_hr)
/* FIXME: add WriteAttributes */
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteCharEntity(writer, aW[0]);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteChars(writer, aW, 1);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteDocType(writer, aW, NULL, NULL, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteEntityRef(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx, expected %#lx.\n", hr, exp_hr);
/* FIXME: add WriteNode */
/* FIXME: add WriteNodeShallow */
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteQualifiedName(writer, aW, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteRaw(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteRawChars(writer, aW, 1);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == exp_hr, "got 0x%08x, expected 0x%08x\n", hr, exp_hr);
+ ok(hr == exp_hr, "Unexpected hr %#lx., expected %#lx.\n", hr, exp_hr);
/* FIXME: add WriteSurrogateCharEntity */
/* FIXME: add WriteWhitespace */
@@ -195,10 +195,10 @@ static IStream *writer_set_output(IXmlWriter *writer)
HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
return stream;
}
@@ -295,39 +295,39 @@ static void test_writer_create(void)
}
hr = CreateXmlWriter(&IID_IStream, (void **)&unk, NULL);
- ok(hr == E_NOINTERFACE, "got %08x\n", hr);
+ ok(hr == E_NOINTERFACE, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IUnknown, (void **)&unk, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IUnknown_QueryInterface(unk, &IID_IXmlWriter, (void **)&writer);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk == (IUnknown *)writer, "unexpected interface pointer\n");
IUnknown_Release(unk);
IXmlWriter_Release(writer);
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* check default properties values */
value = 0;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_ByteOrderMark, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == TRUE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == TRUE, "got %Id.\n", value);
value = TRUE;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_Indent, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == FALSE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == FALSE, "got %Id.\n", value);
value = TRUE;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_OmitXmlDeclaration, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == FALSE, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == FALSE, "got %Id.\n", value);
value = XmlConformanceLevel_Auto;
hr = IXmlWriter_GetProperty(writer, XmlWriterProperty_ConformanceLevel, &value);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
- ok(value == XmlConformanceLevel_Document, "got %ld\n", value);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(value == XmlConformanceLevel_Document, "got %Id.\n", value);
IXmlWriter_Release(writer);
}
@@ -337,78 +337,78 @@ static void test_invalid_output_encoding(IXmlWriter *writer, IUnknown *output)
HRESULT hr;
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "Failed to set output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set output, hr %#lx.\n", hr);
/* TODO: WriteAttributes */
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCharEntity(writer, 0x100);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteChars(writer, aW, 1);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteDocType(writer, aW, NULL, NULL, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEntityRef(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
/* TODO: WriteNode */
/* TODO: WriteNodeShallow */
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteQualifiedName(writer, aW, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRawChars(writer, aW, 1);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == MX_E_ENCODING, "Unexpected hr %#x.\n", hr);
+ ok(hr == MX_E_ENCODING, "Unexpected hr %#lx.\n", hr);
/* TODO: WriteSurrogateCharEntity */
- /* ًُُTODO: WriteWhitespace */
+ /* TODO: WriteWhitespace */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
}
static void test_writeroutput(void)
@@ -425,15 +425,15 @@ static void test_writeroutput(void)
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, NULL, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
EXPECT_REF(output, 1);
IUnknown_Release(output);
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
unk = NULL;
hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (void**)&unk);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(unk != NULL && unk != output, "got %p, output %p\n", unk, output);
EXPECT_REF(output, 2);
@@ -444,14 +444,14 @@ static void test_writeroutput(void)
output = NULL;
hr = CreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, ~0u, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(output);
hr = CreateXmlWriterOutputWithEncodingCodePage(&testoutput, NULL, CP_UTF8, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
unk = NULL;
hr = IUnknown_QueryInterface(output, &IID_IXmlWriterOutput, (void**)&unk);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(unk != NULL, "got %p\n", unk);
/* releasing 'unk' crashes on native */
IUnknown_Release(output);
@@ -460,27 +460,27 @@ static void test_writeroutput(void)
/* create with us-ascii */
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName(&testoutput, NULL, usasciiW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IUnknown_Release(output);
/* Output with codepage 1200. */
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create writer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer, hr %#lx.\n", hr);
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Failed to create stream, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create stream, hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingCodePage((IUnknown *)stream, NULL, 1200, &output);
- ok(hr == S_OK, "Failed to create writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer output, hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "Failed to set writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to set writer output, hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "Write failed, hr %#x.\n", hr);
+ ok(hr == S_OK, "Write failed, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, utf16_outputW, sizeof(utf16_outputW));
@@ -489,11 +489,11 @@ static void test_writeroutput(void)
/* Create output with meaningless code page value. */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "Failed to create stream, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create stream, hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingCodePage((IUnknown *)stream, NULL, ~0u, &output);
- ok(hr == S_OK, "Failed to create writer output, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer output, hr %#lx.\n", hr);
test_invalid_output_encoding(writer, output);
CHECK_OUTPUT(stream, "");
@@ -503,11 +503,11 @@ static void test_writeroutput(void)
/* Same, with invalid encoding name. */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName((IUnknown *)stream, NULL, dummyW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
test_invalid_output_encoding(writer, output);
CHECK_OUTPUT(stream, "");
@@ -532,55 +532,55 @@ static void test_writestartdocument(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* output not set */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
/* nothing written yet */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, fullprolog);
/* one more time */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
/* now add PI manually, and try to start a document */
stream = writer_set_output(writer);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
/* another attempt to add 'xml' PI */
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
@@ -589,23 +589,23 @@ static void test_writestartdocument(void)
/* create with us-ascii */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
output = NULL;
hr = CreateXmlWriterOutputWithEncodingName((IUnknown *)stream, NULL, usasciiW, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion2);
@@ -620,28 +620,28 @@ static void test_flush(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)&teststream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
g_write_len = 0;
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(g_write_len > 0, "got %d\n", g_write_len);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(g_write_len > 0, "Unexpected length %lu.\n", g_write_len);
g_write_len = 1;
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
- ok(g_write_len == 0, "got %d\n", g_write_len);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
+ ok(g_write_len == 0, "Unexpected length %lu.\n", g_write_len);
/* Release() flushes too */
g_write_len = 1;
IXmlWriter_Release(writer);
- ok(g_write_len == 0, "got %d\n", g_write_len);
+ ok(g_write_len > 0, "Unexpected length %lu.\n", g_write_len);
}
static void test_omitxmldeclaration(void)
@@ -656,20 +656,20 @@ static void test_omitxmldeclaration(void)
char *ptr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ptr = GlobalLock(hglobal);
ok(!ptr, "got %p\n", ptr);
@@ -677,7 +677,7 @@ static void test_omitxmldeclaration(void)
/* one more time */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
@@ -685,35 +685,35 @@ static void test_omitxmldeclaration(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, prologversion);
/* another attempt to add 'xml' PI */
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
IXmlWriter_Release(writer);
@@ -735,25 +735,25 @@ static void test_bom(void)
HRESULT hr;
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* BOM is on by default */
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, bomW, sizeof(bomW));
@@ -762,19 +762,19 @@ static void test_bom(void)
/* start with PI */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, xmlW, versionW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, piW, sizeof(piW));
@@ -783,19 +783,19 @@ static void test_bom(void)
/* start with element */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, aopenW, sizeof(aopenW));
@@ -804,24 +804,24 @@ static void test_bom(void)
/* WriteElementString */
hr = CreateStreamOnHGlobal(NULL, TRUE, &stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = CreateXmlWriterOutputWithEncodingName((IUnknown*)stream, NULL, utf16W, &output);
- ok(hr == S_OK, "got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, output);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_RAW(stream, afullW, sizeof(afullW));
@@ -922,65 +922,65 @@ static void test_WriteStartElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a");
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteProcessingInstruction(writer, aW, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
IXmlWriter_Release(writer);
/* WriteElementString */
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, "prefix", "a", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == S_OK, "Failed to write element string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element string, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "c", NULL, NULL);
- ok(hr == S_OK, "Failed to write element string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element string, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "d", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, "", "e", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, "prefix2", "f", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<prefix:a xmlns:prefix=\"uri\">"
@@ -1000,24 +1000,24 @@ static void test_WriteStartElement(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_start_element(writer, start_element_tests[i].prefix, start_element_tests[i].local,
start_element_tests[i].uri);
- ok(hr == start_element_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == start_element_tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(start_element_tests[i].hr))
{
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, start_element_tests[i].output_partial, start_element_tests[i].todo_partial, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, start_element_tests[i].output, start_element_tests[i].todo, __LINE__);
}
@@ -1072,54 +1072,54 @@ static void test_WriteElementString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, "value");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "b", NULL, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "b", "uri", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, "prefix", "c", "uri");
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "d", NULL, NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix2", "d", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "e", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "f", "uri2", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, NULL, "g", "uri3", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix", "h", NULL, NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "prefix_i", "i", NULL, NULL);
- ok(hr == WR_E_NSPREFIXWITHEMPTYNSURI, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == WR_E_NSPREFIXWITHEMPTYNSURI, "Failed to write element, hr %#lx.\n", hr);
hr = write_element_string(writer, "", "j", "uri", NULL);
- ok(hr == S_OK, "Failed to write element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a><b>value</b><b />"
@@ -1142,24 +1142,24 @@ static void test_WriteElementString(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_element_string(writer, element_string_tests[i].prefix, element_string_tests[i].local,
element_string_tests[i].uri, element_string_tests[i].value);
- ok(hr == element_string_tests[i].hr, "%u: unexpected hr %#x.\n", i, hr);
+ ok(hr == element_string_tests[i].hr, "%u: unexpected hr %#lx.\n", i, hr);
if (SUCCEEDED(element_string_tests[i].hr))
{
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, element_string_tests[i].output, element_string_tests[i].todo, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, element_string_tests[i].output, element_string_tests[i].todo, __LINE__);
}
@@ -1177,24 +1177,24 @@ static void test_WriteEndElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a><b /></a>");
@@ -1213,47 +1213,47 @@ static void test_writeenddocument(void)
char *ptr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
/* WriteEndDocument resets it to initial state */
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_SetOutput(writer, (IUnknown*)stream);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = GetHGlobalFromStream(stream, &hglobal);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ptr = GlobalLock(hglobal);
ok(ptr == NULL, "got %p\n", ptr);
/* we still need to flush manually, WriteEndDocument doesn't do that */
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<a><b /></a>");
@@ -1271,35 +1271,35 @@ static void test_WriteComment(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, closeW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<!--a--><b><!--a--><!----><!--- ->-->");
@@ -1318,32 +1318,32 @@ static void test_WriteCData(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, closeW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCData(writer, close2W);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>"
@@ -1367,48 +1367,48 @@ static void test_WriteRaw(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteRaw(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, aW, NULL, aW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Yes);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, rawW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteRaw(writer, rawW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>a<:a<:<!--a<:-->a<:<a>a</a>");
@@ -1424,7 +1424,7 @@ static void test_writer_state(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* initial state */
check_writer_state(writer, E_UNEXPECTED);
@@ -1433,7 +1433,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1442,7 +1442,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteAttributeString(writer, NULL, aW, NULL, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1451,7 +1451,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1460,7 +1460,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1469,7 +1469,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteCData(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1478,7 +1478,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteName(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1487,7 +1487,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteNmToken(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1496,7 +1496,7 @@ static void test_writer_state(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteString(writer, aW);
- ok(hr == WR_E_INVALIDACTION, "got 0x%08x\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
check_writer_state(writer, WR_E_INVALIDACTION);
IStream_Release(stream);
@@ -1514,7 +1514,7 @@ static void test_indentation(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
@@ -1522,22 +1522,22 @@ static void test_indentation(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteComment(writer, commentW);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, bW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1551,19 +1551,19 @@ static void test_indentation(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteElementString(writer, NULL, bW, NULL, NULL);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1678,7 +1678,7 @@ static void test_WriteAttributeString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
@@ -1687,26 +1687,26 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "Failed to start document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start document, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "e", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_attribute_string(writer, attribute_tests[i].prefix, attribute_tests[i].local,
attribute_tests[i].uri, attribute_tests[i].value);
todo_wine_if(attribute_tests[i].todo_hr)
- ok(hr == attribute_tests[i].hr, "%u: unexpected hr %#x, expected %#x.\n", i, hr, attribute_tests[i].hr);
+ ok(hr == attribute_tests[i].hr, "%u: unexpected hr %#lx, expected %#lx.\n", i, hr, attribute_tests[i].hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, attribute_tests[i].output_partial, attribute_tests[i].todo_partial, __LINE__);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "Failed to end document, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end document, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
check_output(stream, attribute_tests[i].output, attribute_tests[i].todo, __LINE__);
IStream_Release(stream);
@@ -1716,41 +1716,41 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, "p", "a", "outeruri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "local", "uri", "b");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "a", NULL, "b");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "xmlns", "prefix", NULL, "uri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "p", "attr", NULL, "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "local", NULL, "b");
todo_wine
- ok(hr == WR_E_DUPLICATEATTRIBUTE, "got 0x%08x\n", hr);
+ ok(hr == WR_E_DUPLICATEATTRIBUTE, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "attr2", "outeruri", "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = write_attribute_string(writer, "pr", "attr3", "outeruri", "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT_TODO(stream,
"<p:a prefix:local=\"b\" a=\"b\" xmlns:prefix=\"uri\" p:attr=\"value\" xmlns:p=\"outeruri\">"
@@ -1763,22 +1763,22 @@ static void test_WriteAttributeString(void)
stream = writer_set_output(writer);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "e", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "xmlns", "prefix", NULL, "uri");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_attribute_string(writer, "prefix", "attr", NULL, "value");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<e xmlns:prefix=\"uri\" prefix:attr=\"value\" />");
@@ -1796,7 +1796,7 @@ static void test_WriteFullEndElement(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* standalone element */
stream = writer_set_output(writer);
@@ -1805,19 +1805,19 @@ static void test_WriteFullEndElement(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a></a>");
@@ -1830,22 +1830,22 @@ static void test_WriteFullEndElement(void)
writer_set_property(writer, XmlWriterProperty_Indent);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -1864,7 +1864,7 @@ static void test_WriteCharEntity(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* without indentation */
stream = writer_set_output(writer);
@@ -1872,22 +1872,22 @@ static void test_WriteCharEntity(void)
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = IXmlWriter_WriteStartDocument(writer, XmlStandalone_Omit);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteCharEntity(writer, 0x100);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteStartElement(writer, NULL, aW, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndDocument(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>Ā<a /></a>");
@@ -1903,39 +1903,39 @@ static void test_WriteString(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void**)&writer, NULL);
- ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
writer_set_property(writer, XmlWriterProperty_OmitXmlDeclaration);
hr = write_string(writer, "a");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == E_UNEXPECTED, "got 0x%08x\n", hr);
+ ok(hr == E_UNEXPECTED, "Unexpected hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, "a");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
/* WriteString automatically escapes markup characters */
hr = write_string(writer, "<&\">=");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>a<&\">=");
@@ -1944,22 +1944,22 @@ static void test_WriteString(void)
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = write_string(writer, NULL);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b");
hr = write_string(writer, "");
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<b>");
@@ -1969,43 +1969,43 @@ static void test_WriteString(void)
/* With indentation */
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create a writer, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create a writer, hr %#lx.\n", hr);
stream = writer_set_output(writer);
writer_set_property(writer, XmlWriterProperty_Indent);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_string(writer, "text");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b>text");
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b>text</b>");
hr = IXmlWriter_WriteFullEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2017,29 +2017,29 @@ static void test_WriteString(void)
stream = writer_set_output(writer);
hr = write_start_element(writer, NULL, "a", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_start_element(writer, NULL, "b", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
" <b />");
hr = write_start_element(writer, NULL, "c", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_attribute_string(writer, NULL, "attr", NULL, "value");
- ok(hr == S_OK, "Failed to write attribute string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write attribute string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2047,10 +2047,10 @@ static void test_WriteString(void)
" <c attr=\"value\"");
hr = write_string(writer, "text");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2058,10 +2058,10 @@ static void test_WriteString(void)
" <c attr=\"value\">text");
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2069,16 +2069,16 @@ static void test_WriteString(void)
" <c attr=\"value\">text</c>");
hr = write_start_element(writer, NULL, "d", NULL);
- ok(hr == S_OK, "Failed to start element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start element, hr %#lx.\n", hr);
hr = write_string(writer, "");
- ok(hr == S_OK, "Failed to write a string, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to write a string, hr %#lx.\n", hr);
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2087,10 +2087,10 @@ static void test_WriteString(void)
" <d></d>");
hr = IXmlWriter_WriteEndElement(writer);
- ok(hr == S_OK, "Failed to end element, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to end element, hr %#lx.\n", hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream,
"<a>\r\n"
@@ -2163,23 +2163,23 @@ static void test_WriteDocType(void)
HRESULT hr;
hr = CreateXmlWriter(&IID_IXmlWriter, (void **)&writer, NULL);
- ok(hr == S_OK, "Failed to create writer instance, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to create writer instance, hr %#lx.\n", hr);
stream = writer_set_output(writer);
hr = IXmlWriter_WriteDocType(writer, NULL, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IXmlWriter_WriteDocType(writer, emptyW, NULL, NULL, NULL);
- ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr);
+ ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
/* Name validation. */
hr = IXmlWriter_WriteDocType(writer, nameW, NULL, NULL, NULL);
- ok(hr == WC_E_NAMECHARACTER, "Unexpected hr %#x.\n", hr);
+ ok(hr == WC_E_NAMECHARACTER, "Unexpected hr %#lx.\n", hr);
/* Pubid validation. */
hr = IXmlWriter_WriteDocType(writer, aW, pubidW, NULL, NULL);
- ok(hr == WC_E_PUBLICID, "Unexpected hr %#x.\n", hr);
+ ok(hr == WC_E_PUBLICID, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
@@ -2189,16 +2189,16 @@ static void test_WriteDocType(void)
hr = write_doctype(writer, doctype_tests[i].name, doctype_tests[i].pubid, doctype_tests[i].sysid,
doctype_tests[i].subset);
- ok(hr == S_OK, "%u: failed to write doctype, hr %#x.\n", i, hr);
+ ok(hr == S_OK, "%u: failed to write doctype, hr %#lx.\n", i, hr);
hr = IXmlWriter_Flush(writer);
- ok(hr == S_OK, "Failed to flush, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to flush, hr %#lx.\n", hr);
CHECK_OUTPUT(stream, doctype_tests[i].output);
hr = write_doctype(writer, doctype_tests[i].name, doctype_tests[i].pubid, doctype_tests[i].sysid,
doctype_tests[i].subset);
- ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#x.\n", hr);
+ ok(hr == WR_E_INVALIDACTION, "Unexpected hr %#lx.\n", hr);
IStream_Release(stream);
}
--
2.34.1
2
1
[PATCH 1/2] dwrite/tests: Add some tests for Segoe UI font family. (Resend)
by Dmitry Timoshkov Feb. 7, 2022
by Dmitry Timoshkov Feb. 7, 2022
Feb. 7, 2022
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/dwrite/tests/layout.c | 139 +++++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 3fe149927ca..c242155cce3 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -6489,6 +6489,144 @@ if (SUCCEEDED(hr))
IDWriteFactory_Release(factory);
}
+#define get_font_name(a, b, c) get_font_name_(a, b, c, __LINE__)
+static void get_font_name_(IDWriteFont *font, WCHAR *name, UINT32 size, int line)
+{
+ HRESULT hr;
+ IDWriteFontFamily *family;
+ IDWriteLocalizedStrings *names;
+ UINT32 index;
+ BOOL exists;
+
+ hr = IDWriteFont_GetFontFamily(font, &family);
+ ok_(__FILE__, line)(hr == S_OK, "got %#x\n", hr);
+
+ hr = IDWriteFontFamily_GetFamilyNames(family, &names);
+ ok_(__FILE__, line)(hr == S_OK, "got %#x\n", hr);
+
+ hr = IDWriteLocalizedStrings_FindLocaleName(names, L"en-us", &index, &exists);
+ ok_(__FILE__, line)(hr == S_OK, "got %#x\n", hr);
+ ok_(__FILE__, line)(index != UINT_MAX && exists, "name was not found\n");
+ hr = IDWriteLocalizedStrings_GetString(names, index, name, size);
+ ok_(__FILE__, line)(hr == S_OK, "got %#x\n", hr);
+
+ IDWriteLocalizedStrings_Release(names);
+ IDWriteFontFamily_Release(family);
+}
+
+static void test_SegoeUI(void)
+{
+ static const WCHAR *families[] = { L"Tahoma", L"Segoe UI", NULL };
+ static const WCHAR text[] = { 0x25d4, 0 };
+ HRESULT hr;
+ IDWriteFactory2 *factory;
+ IDWriteFontCollection *collection;
+ IDWriteFontFamily *family;
+ IDWriteFont *font;
+ IDWriteFontFallback *fallback;
+ UINT32 index, count, i, mappedlength;
+ WCHAR name[256];
+ BOOL exists, found;
+ FLOAT scale;
+
+ hr = DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, &IID_IDWriteFactory2, (IUnknown **)&factory);
+ if (hr != S_OK)
+ {
+ win_skip("IDWriteFactory2 is not supported\n");
+ return;
+ }
+
+ hr = IDWriteFactory2_GetSystemFontCollection(factory, &collection, FALSE);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ hr = IDWriteFontCollection_FindFamilyName(collection, L"Segoe UI", &index, &exists);
+ ok(hr == S_OK, "got %#x\n", hr);
+ if (!exists)
+ {
+ skip("Segoe UI is not installed\n");
+ IDWriteFontCollection_Release(collection);
+ IDWriteFactory2_Release(factory);
+ return;
+ }
+ ok(index != UINT_MAX && exists, "Segoe UI was not found\n");
+
+ hr = IDWriteFontCollection_GetFontFamily(collection, index, &family);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ count = IDWriteFontFamily_GetFontCount(family);
+ trace("family Segoe UI has %u fonts\n", count);
+
+ found = FALSE;
+
+ for (i = 0; i < count; i++)
+ {
+ hr = IDWriteFontFamily_GetFont(family, i, &font);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ get_font_name(font, name, ARRAY_SIZE(name));
+ if (!wcscmp(name, L"Segoe UI Symbol"))
+ found = TRUE;
+
+ hr = IDWriteFont_HasCharacter(font, 0x25d4, &exists);
+ ok(hr == S_OK, "got %#x\n", hr);
+ ok(!exists, "%u: %s has character 0x25d4\n", i, wine_dbgstr_w(name));
+
+ IDWriteFont_Release(font);
+ }
+
+ ok(!found, "Segoe UI Symbol should not be part of Segoe UI family\n");
+
+ IDWriteFontFamily_Release(family);
+
+ hr = IDWriteFactory2_GetSystemFontFallback(factory, &fallback);
+ ok(hr == S_OK, "got %#x\n", hr);
+
+ g_source = text;
+
+ hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, collection, L"Segoe UI", DWRITE_FONT_WEIGHT_NORMAL,
+ DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
+ ok(hr == S_OK, "got %#x\n", hr);
+ ok(mappedlength == 1, "got %u\n", mappedlength);
+ ok(scale == 1.0f, "got %f\n", scale);
+
+ get_font_name(font, name, ARRAY_SIZE(name));
+todo_wine
+ ok(!wcscmp(name, L"Segoe UI Symbol"), "got %s\n", wine_dbgstr_w(name));
+
+ hr = IDWriteFont_HasCharacter(font, 0x25d4, &exists);
+ ok(hr == S_OK, "got %#x\n", hr);
+todo_wine
+ ok(exists, "%s should have character 0x25d4\n", wine_dbgstr_w(name));
+
+ IDWriteFont_Release(font);
+
+ for (i = 0; i < ARRAY_SIZE(families); i++)
+ {
+ hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, collection, families[i], DWRITE_FONT_WEIGHT_NORMAL,
+ DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
+todo_wine_if(families[i] == NULL)
+ ok(hr == S_OK, "%u: %s - got %#x\n", i, wine_dbgstr_w(families[i]), hr);
+ if (hr != S_OK) continue;
+ ok(mappedlength == 1, "got %u\n", mappedlength);
+ ok(scale == 1.0f, "got %f\n", scale);
+
+ get_font_name(font, name, ARRAY_SIZE(name));
+todo_wine
+ ok(!wcscmp(name, L"Segoe UI Symbol"), "got %s\n", wine_dbgstr_w(name));
+
+ hr = IDWriteFont_HasCharacter(font, 0x25d4, &exists);
+ ok(hr == S_OK, "got %#x\n", hr);
+todo_wine
+ ok(exists, "%s should have character 0x25d4\n", wine_dbgstr_w(name));
+
+ IDWriteFont_Release(font);
+ }
+
+ IDWriteFontFallback_Release(fallback);
+ IDWriteFontCollection_Release(collection);
+ IDWriteFactory2_Release(factory);
+}
+
START_TEST(layout)
{
IDWriteFactory *factory;
@@ -6544,6 +6682,7 @@ START_TEST(layout)
test_text_format_axes();
test_layout_range_length();
test_HitTestTextRange();
+ test_SegoeUI();
IDWriteFactory_Release(factory);
}
--
2.34.1
2
7
Feb. 7, 2022
All the notification codes (printed as an id) have negative base value
(SBN_, UDN_, HDN_, BCN_, TBN_, TTN_, RBN_, TRBN_, PGN_, TVN_, LVN_, TCN_,
CBEN_, IPN_, MCN_, DTN_), and printing them as decimal helps to quickly
identify the corresponding notification value in cases when an id in
the message sequence doesn't match. Custom ids in the message sequences
have small numbers (0, 1, 2, ...), so they also get printed correctly.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
---
dlls/comctl32/tests/msg.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/msg.h b/dlls/comctl32/tests/msg.h
index 7337c724a5c..8ba2efddb0a 100644
--- a/dlls/comctl32/tests/msg.h
+++ b/dlls/comctl32/tests/msg.h
@@ -261,14 +261,14 @@ static void ok_sequence_(struct msg_sequence **seq, int sequence_index,
failcount++;
dump++;
ok_(file, line) (FALSE,
- "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n",
+ "%s: in msg 0x%04x expecting id %d got %d\n",
context, expected->message, expected->id, actual->id);
}
}
else
{
ok_(file, line) (expected->id == actual->id,
- "%s: in msg 0x%04x expecting id 0x%x got 0x%x\n",
+ "%s: in msg 0x%04x expecting id %d got %d\n",
context, expected->message, expected->id, actual->id);
if (expected->id != actual->id) dump++;
}
--
2.34.1
2
3
Feb. 7, 2022
The test gets spurious GetScrollInfo SB_HORZ failures if some other
windows were created before using CW_USEDEFAULT positions, for instance
the window from test_capture_4.
This happened on some Win10 VMs, and was thought to be fixed with
9b5346df86bf1a85336ed03a67a630970ce08e9f, but it then broke the test on
some other VMs. This is hopefully a better fix, and it reverts the
previous one too.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=52507
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/user32/tests/win.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index 8ec6d8af064..8614a048c4d 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2256,7 +2256,7 @@ static void test_mdi(void)
mdi_hwndMain = CreateWindowExA(0, "MDI_parent_Class", "MDI parent window",
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX /*| WS_VISIBLE*/,
- 200, 100, CW_USEDEFAULT, CW_USEDEFAULT,
+ 100, 100, CW_USEDEFAULT, CW_USEDEFAULT,
GetDesktopWindow(), 0,
GetModuleHandleA(NULL), NULL);
assert(mdi_hwndMain);
@@ -12644,6 +12644,10 @@ START_TEST(win)
our_pid = GetWindowThreadProcessId(hwndMain, NULL);
+ /* This test is sensitive to other windows created with
+ * CW_USEDEFAULT position, execute it early too */
+ test_mdi();
+
/* Add the tests below this line */
test_child_window_from_point();
test_window_from_point(argv[0]);
@@ -12665,7 +12669,6 @@ START_TEST(win)
test_parent_owner();
test_enum_thread_windows();
- test_mdi();
test_icons();
test_SetWindowPos(hwndMain, hwndMain2);
test_SetMenu(hwndMain);
--
2.34.1
2
1
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/rtworkq/tests/Makefile.in | 1 -
dlls/rtworkq/tests/rtworkq.c | 32 ++++++++++++++++----------------
2 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/dlls/rtworkq/tests/Makefile.in b/dlls/rtworkq/tests/Makefile.in
index 7a2f6db51c7..8354cd810d1 100644
--- a/dlls/rtworkq/tests/Makefile.in
+++ b/dlls/rtworkq/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = rtworkq.dll
IMPORTS = rtworkq ole32
diff --git a/dlls/rtworkq/tests/rtworkq.c b/dlls/rtworkq/tests/rtworkq.c
index 627e024d761..2ff74d57b84 100644
--- a/dlls/rtworkq/tests/rtworkq.c
+++ b/dlls/rtworkq/tests/rtworkq.c
@@ -33,72 +33,72 @@ static void test_platform_init(void)
/* Startup initializes MTA. */
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == CO_E_NOTINITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "Unexpected hr %#lx.\n", hr);
hr = RtwqStartup();
- ok(hr == S_OK, "Failed to start up, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(apttype == APTTYPE_MTA && qualifier == APTTYPEQUALIFIER_IMPLICIT_MTA,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
hr = RtwqShutdown();
- ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == CO_E_NOTINITIALIZED, "Unexpected hr %#x.\n", hr);
+ ok(hr == CO_E_NOTINITIALIZED, "Unexpected hr %#lx.\n", hr);
/* Try with STA initialized before startup. */
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(apttype == APTTYPE_MAINSTA && qualifier == APTTYPEQUALIFIER_NONE,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
hr = RtwqStartup();
- ok(hr == S_OK, "Failed to start up, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(apttype == APTTYPE_MAINSTA && qualifier == APTTYPEQUALIFIER_NONE,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
hr = RtwqShutdown();
- ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
CoUninitialize();
/* Startup -> init main STA -> uninitialize -> shutdown */
hr = RtwqStartup();
- ok(hr == S_OK, "Failed to start up, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to start up, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK || broken(FAILED(hr)) /* Win8 */, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ok(apttype == APTTYPE_MTA && qualifier == APTTYPEQUALIFIER_IMPLICIT_MTA,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
- ok(hr == S_OK, "Failed to initialize, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to initialize, hr %#lx.\n", hr);
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(apttype == APTTYPE_MAINSTA && qualifier == APTTYPEQUALIFIER_NONE,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
CoUninitialize();
hr = CoGetApartmentType(&apttype, &qualifier);
- ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(apttype == APTTYPE_MTA && qualifier == APTTYPEQUALIFIER_IMPLICIT_MTA,
"Unexpected apartment type %d, qualifier %d.\n", apttype, qualifier);
hr = RtwqShutdown();
- ok(hr == S_OK, "Failed to shut down, hr %#x.\n", hr);
+ ok(hr == S_OK, "Failed to shut down, hr %#lx.\n", hr);
}
START_TEST(rtworkq)
--
2.34.1
1
0