35 DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda);
58 static const char xmldecl_full[] =
"\xef\xbb\xbf<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n";
59 static const char xmldecl_short[] =
"<?xml version=\"1.0\"?><RegistrationInfo/>";
74 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
83 UINT pos_broken,
int _line_)
88 IXmlReader_GetLineNumber(
reader, &
l);
89 IXmlReader_GetLinePosition(
reader, &
p);
91 if (line_broken == ~0
u && pos_broken == ~0
u)
94 broken_state =
broken((line_broken == ~0
u ?
line : line_broken) ==
l &&
95 (pos_broken == ~0
u ?
pos : pos_broken) ==
p);
97 ok_(__FILE__, _line_)((
l ==
line &&
pos ==
p) || broken_state,
98 "Expected (%d,%d), got (%d,%d)\n",
line,
pos,
l,
p);
100 #define TEST_READER_POSITION(reader, line, pos) \ 101 test_reader_pos(reader, line, pos, ~0u, ~0u, __LINE__) 102 #define TEST_READER_POSITION2(reader, line, pos, line_broken, pos_broken) \ 103 test_reader_pos(reader, line, pos, line_broken, pos_broken, __LINE__) 111 &IID_IXmlReaderInput,
113 &IID_ISequentialStream,
119 &IID_IXmlReaderInput,
120 &IID_ISequentialStream,
128 &IID_ISequentialStream,
155 #define ok_iids(got, exp, brk, todo) ok_iids_(got, exp, brk, todo, __LINE__) 159 static const char* state_names[] = {
160 "XmlReadState_Initial",
161 "XmlReadState_Interactive",
162 "XmlReadState_Error",
163 "XmlReadState_EndOfFile",
164 "XmlReadState_Closed" 167 static const char unknown[] =
"unknown";
176 return state_names[
state];
184 static const char* type_names[] = {
186 "XmlNodeType_Element",
187 "XmlNodeType_Attribute",
191 "XmlNodeType_ProcessingInstruction",
192 "XmlNodeType_Comment",
194 "XmlNodeType_DocumentType",
196 "XmlNodeType_Whitespace",
198 "XmlNodeType_EndElement",
200 "XmlNodeType_XmlDeclaration" 203 static const char unknown[] =
"unknown";
218 return type_names[
type];
224 #define set_input_string(a,b) _set_input_string(__LINE__,a,b); 238 #define read_node(a,b) _read_node(__LINE__,a,b) 249 ok_(__FILE__,
line)(
type == expected_type,
"read type %d, expected %d\n",
type, expected_type);
252 #define next_attribute(a) _next_attribute(__LINE__,a) 256 hr = IXmlReader_MoveToNextAttribute(
reader);
257 ok_(__FILE__,
line)(
hr ==
S_OK,
"MoveToNextAttribute returned %08x\n",
hr);
260 #define move_to_element(a) _move_to_element(__LINE__,a) 264 hr = IXmlReader_MoveToElement(
reader);
278 broken_state =
FALSE;
286 #define TEST_READER_STATE(reader, state) test_read_state(reader, state, state, __LINE__) 287 #define TEST_READER_STATE2(reader, state, brk) test_read_state(reader, state, brk, __LINE__) 289 #define reader_value(a,b) _reader_value(__LINE__,a,b) 292 const WCHAR *
str = (
void*)0xdeadbeef;
303 #define reader_name(a,b) _reader_name(__LINE__,a,b) 306 const WCHAR *
str = (
void*)0xdeadbeef;
317 #define reader_prefix(a,b) _reader_prefix(__LINE__,a,b) 320 const WCHAR *
str = (
void*)0xdeadbeef;
331 #define reader_namespace(a,b) _reader_namespace(__LINE__,a,b) 334 const WCHAR *
str = (
void*)0xdeadbeef;
345 #define reader_qname(a,b) _reader_qname(a,b,__LINE__) 348 const WCHAR *
str = (
void*)0xdeadbeef;
353 ok_(__FILE__,
line)(
hr ==
S_OK,
"GetQualifiedName returned %08x\n",
hr);
359 #define read_value_char(a,b) _read_value_char(a,b,__LINE__) 369 ok_(__FILE__,
line)(
c == expected_char,
"got %x\n",
c);
388 IUnknown_AddRef(iface);
434 *ppObj = &
input->IUnknown_iface;
465 static const char xml[] =
"<!-- comment -->";
473 *
pread =
sizeof(xml) / 2;
480 ok(0,
"unexpected call\n");
500 IXmlResolver_AddRef(iface);
521 ok(0,
"unexpected call\n");
555 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
556 hr = IUnknown_QueryInterface(unk, &IID_IXmlReader, (
void **)&
reader);
557 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
559 IXmlReader_Release(
reader);
560 IUnknown_Release(unk);
563 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
564 IXmlReader_Release(
reader);
567 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
572 hr = IXmlReader_GetNodeType(
reader, &nodetype);
583 resolver = (
void*)0xdeadbeef;
586 ok(resolver ==
NULL,
"got %p\n", resolver);
598 IXmlResolver_Release(resolver);
605 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
617 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
623 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
631 IUnknown_Release(
input);
633 IXmlReader_Release(
reader);
652 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
655 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
658 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
660 hr = IUnknown_QueryInterface(reader_input, &IID_IStream, (
void**)&stream2);
663 hr = IUnknown_QueryInterface(reader_input, &IID_ISequentialStream, (
void**)&stream2);
668 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
673 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
675 ref = IUnknown_AddRef(reader_input);
676 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
677 IUnknown_Release(reader_input);
679 hr = IXmlReader_SetInput(
reader, reader_input);
680 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
685 hr = IXmlReader_GetNodeType(
reader, &nodetype);
690 ref = IUnknown_AddRef(reader_input);
691 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
692 IUnknown_Release(reader_input);
695 ok(
ref == 4,
"Expected 4, got %d\n",
ref);
700 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
704 IXmlReader_Release(
reader);
707 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
710 ref = IUnknown_AddRef(reader_input);
711 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
712 IUnknown_Release(reader_input);
719 hr = IUnknown_QueryInterface(reader_input, &IID_IXmlReaderInput, (
void**)&
obj);
720 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
721 ref = IUnknown_AddRef(reader_input);
722 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
723 IUnknown_Release(reader_input);
725 IUnknown_Release(reader_input);
726 IUnknown_Release(reader_input);
732 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
736 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
737 IUnknown_Release(
input);
739 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
743 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
744 IUnknown_Release(
input);
747 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
750 ref = IUnknown_AddRef(reader_input);
751 ok(
ref == 2,
"Expected 2, got %d\n",
ref);
752 IUnknown_Release(reader_input);
754 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
755 IUnknown_Release(
input);
756 hr = IXmlReader_SetInput(
reader, reader_input);
763 ok(
ref == 3,
"Expected 3, got %d\n",
ref);
764 IUnknown_Release(
input);
766 ref = IUnknown_AddRef(reader_input);
768 "Expected 3, got %d\n",
ref);
769 IUnknown_Release(reader_input);
772 hr = IXmlReader_SetInput(
reader, reader_input);
778 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
783 hr = IXmlReader_SetInput(reader2, reader_input);
787 IXmlReader_Release(reader2);
788 IXmlReader_Release(
reader);
790 IUnknown_Release(reader_input);
791 IUnknown_Release(
input);
801 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
813 hr = IXmlReader_Read(
reader, &nodetype);
820 hr = IXmlReader_Read(
reader, &nodetype);
829 hr = IXmlReader_Read(
reader, &nodetype);
834 IXmlReader_Release(
reader);
842 IXmlReader_GetDepth(
reader, &
d);
850 #define TEST_DEPTH(reader, depth) test_reader_depth(reader, depth, ~0u, __LINE__) 851 #define TEST_DEPTH2(reader, depth, brk) test_reader_depth(reader, depth, brk, __LINE__) 861 { {
'v',
'e',
'r',
's',
'i',
'o',
'n',0}, {
'1',
'.',
'0',0} },
862 { {
'e',
'n',
'c',
'o',
'd',
'i',
'n',
'g',0}, {
'U',
'T',
'F',
'-',
'8',0} },
863 { {
's',
't',
'a',
'n',
'd',
'a',
'l',
'o',
'n',
'e',0}, {
'y',
'e',
's',0} }
874 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
879 ok(
hr ==
S_OK,
"Expected S_OK, got %08x\n",
hr);
886 hr = IXmlReader_MoveToElement(
reader);
889 hr = IXmlReader_MoveToNextAttribute(
reader);
892 hr = IXmlReader_MoveToFirstAttribute(
reader);
922 hr = IXmlReader_MoveToNextAttribute(
reader);
930 hr = IXmlReader_MoveToFirstAttribute(
reader);
955 hr = IXmlReader_MoveToNextAttribute(
reader);
983 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
990 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
994 ok(!
ret,
"element should not be empty\n");
1006 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1011 hr = IXmlReader_MoveToNextAttribute(
reader);
1019 ok(
hr ==
S_OK,
"expected S_OK, got %08x\n",
hr);
1022 ret = IXmlReader_IsEmptyElement(
reader);
1023 ok(
ret,
"element should be empty\n");
1038 IXmlReader_Release(
reader);
1051 {
"<!-- comment -->",
"",
" comment ",
S_OK },
1052 {
"<!-- - comment-->",
"",
" - comment",
S_OK },
1060 static const char *teststr =
"<a>text<!-- comment --></a>";
1089 ok(*
value != 0,
"Expected node value\n");
1100 if (
test->hr_broken)
1131 IXmlReader_Release(
reader);
1135 {
"<?pi?>",
"pi",
"",
S_OK },
1136 {
"<?pi ?>",
"pi",
"",
S_OK },
1137 {
"<?pi ?>",
"pi",
"",
S_OK },
1138 {
"<?pi pi data?>",
"pi",
"pi data",
S_OK },
1139 {
"<?pi pi data ?>",
"pi",
"pi data ",
S_OK },
1140 {
"<?pi data ?>",
"pi",
"data ",
S_OK },
1144 {
"<?xml-stylesheet ?>",
"xml-stylesheet",
"",
S_OK },
1165 if (
test->hr_broken)
1195 IXmlReader_Release(
reader);
1265 IXmlReader_Release(
reader);
1269 "<!DOCTYPE testdtd PUBLIC \"pubid\" \"externalid uri\" >";
1273 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1295 hr = IXmlReader_MoveToFirstAttribute(
reader);
1327 IXmlReader_Release(
reader);
1331 "<!DOCTYPE testdtd SYSTEM \"externalid uri\" >" 1336 static const WCHAR dtdnameW[] = {
't',
'e',
's',
't',
'd',
't',
'd',0};
1358 hr = IXmlReader_MoveToFirstAttribute(
reader);
1383 IXmlReader_Release(
reader);
1387 {
"<a/>",
"a",
"",
S_OK },
1388 {
"<a />",
"a",
"",
S_OK },
1392 {
"<a>",
"a",
"",
S_OK },
1393 {
"<a >",
"a",
"",
S_OK },
1394 {
"<a \r \t\n>",
"a",
"",
S_OK },
1404 static const char stag[] =
1409 "<d attr4=\"_d\"></d>" 1412 static const UINT depths[] = { 0, 1, 2, 2, 2, 3, 2, 1 };
1428 if (
test->hr_broken)
1471 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1475 const WCHAR *prefix;
1480 ok(prefix !=
NULL,
"got %p\n", prefix);
1492 hr = IXmlReader_GetQualifiedName(
reader, &qname,
NULL);
1494 ok(qname !=
NULL,
"got %p\n", qname);
1496 ok(
local == qname,
"expected same pointer\n");
1521 hr = IXmlReader_MoveToFirstAttribute(
reader);
1530 ok(
depth == depths[
i] + 1,
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i] + 1);
1538 ok(
depth == depths[
i],
"%u: got depth %u, expected %u\n",
i,
depth, depths[
i]);
1556 IXmlReader_Release(
reader);
1588 value = (
void*)0xdeadbeef;
1594 IXmlReader_Release(
reader);
1624 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1626 ok(
c == 0,
"got %u\n",
c);
1627 ok(
b == 0,
"got %x\n",
b);
1632 ok(!
c,
"c = %u\n",
c);
1642 ok(!
c,
"c = %u\n",
c);
1648 ok(
c == 10,
"got %u\n",
c);
1649 ok(
buf[
c] == 0xcccc,
"buffer overflow\n");
1657 ok(!
c,
"got %u\n",
c);
1665 hr = IXmlReader_ReadValueChunk(
reader, &
b, 1, &
c);
1667 ok(
c == 0,
"got %u\n",
c);
1668 ok(
b == 0xffff,
"got %x\n",
b);
1672 IXmlReader_Release(
reader);
1676 {
"<a><![CDATA[ ]]data ]]></a>",
"",
" ]]data ",
S_OK },
1677 {
"<a><![CDATA[<![CDATA[ data ]]]]></a>",
"",
"<![CDATA[ data ]]",
S_OK },
1678 {
"<a><![CDATA[\n \r\n \n\n ]]></a>",
"",
"\n \n \n\n ",
S_OK,
S_OK },
1679 {
"<a><![CDATA[\r \r\r\n \n\n ]]></a>",
"",
"\n \n\n \n\n ",
S_OK,
S_OK },
1680 {
"<a><![CDATA[\r\r \n\r \r \n\n ]]></a>",
"",
"\n\n \n\n \n \n\n ",
S_OK },
1709 if (
test->hr_broken)
1746 IXmlReader_Release(
reader);
1750 {
"<a>simple text</a>",
"",
"simple text",
S_OK },
1752 {
"<a>\n \r\n \n\n text</a>",
"",
"\n \n \n\n text",
S_OK,
S_OK },
1753 {
"<a>\r \r\r\n \n\n text</a>",
"",
"\n \n\n \n\n text",
S_OK,
S_OK },
1815 IXmlReader_Release(
reader);
1824 {
"<a></a>",
FALSE },
1850 ret = IXmlReader_IsEmptyElement(
reader);
1856 IXmlReader_Release(
reader);
1860 {
"<a attr1=\"attrvalue\"/>",
"attr1",
"attrvalue",
S_OK },
1861 {
"<a attr1=\"a\'\'ttrvalue\"/>",
"attr1",
"a\'\'ttrvalue",
S_OK },
1862 {
"<a attr1=\'a\"ttrvalue\'/>",
"attr1",
"a\"ttrvalue",
S_OK },
1863 {
"<a attr1=\' \'/>",
"attr1",
" ",
S_OK },
1864 {
"<a attr1=\" \"/>",
"attr1",
" ",
S_OK },
1865 {
"<a attr1=\"\r\n \r \n \t\n\r\"/>",
"attr1",
" ",
S_OK },
1866 {
"<a attr1=\" val \"/>",
"attr1",
" val ",
S_OK },
1867 {
"<a attr1=\"\r\n\tval\n\"/>",
"attr1",
" val ",
S_OK },
1868 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1869 {
"<a attr1=\"val \"/>",
"attr1",
"val ",
S_OK },
1870 {
"<a attr1=\"<>&'"\"/>",
"attr1",
"<>&\'\"",
S_OK },
1900 if (
test->hr_broken)
1912 ok(
hr ==
S_OK,
"Failed to get node type, %#x\n",
hr);
1916 hr = IXmlReader_MoveToFirstAttribute(
reader);
1937 IXmlReader_Release(
reader);
1951 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1952 ok(
value == 256,
"Unexpected default max depth value %ld\n",
value);
1955 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1958 ok(
hr ==
S_OK,
"SetProperty failed: %08x\n",
hr);
1962 ok(
hr ==
S_OK,
"GetProperty failed: %08x\n",
hr);
1963 ok(
value == 0,
"Unexpected max depth value %ld\n",
value);
1965 IXmlReader_Release(
reader);
1973 const char *prefix1;
1974 const char *prefix2;
1975 const char *prefix3;
1978 {
"<b xmlns=\"defns\" xml:a=\"a ns\"/>",
"",
"",
"xml" },
1979 {
"<c:b xmlns:c=\"c ns\" xml:a=\"a ns\"/>",
"c",
"xmlns",
"xml" },
1999 hr = IXmlReader_MoveToFirstAttribute(
reader);
2000 ok(
hr ==
S_OK,
"MoveToFirstAttribute() failed, %#x.\n",
hr);
2003 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2011 ok(
hr ==
S_OK,
"GetNodeType() failed, %#x.\n",
hr);
2021 IXmlReader_Release(
reader);
2032 {
"<a xmlns=\"defns a\"><b xmlns=\"defns b\"><c xmlns=\"defns c\"/></b></a>",
2033 {
"defns a",
"defns b",
"defns c",
"defns b",
"defns a" }},
2034 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"/>",
2036 {
"<r:a xmlns=\"defns a\" xmlns:r=\"ns r\"><b/></r:a>",
2037 {
"ns r",
"defns a",
"ns r" }},
2038 {
"<a xmlns=\"defns a\" xmlns:r=\"ns r\"><r:b/></a>",
2039 {
"defns a",
"ns r",
"defns a" }},
2040 {
"<a><b><c/></b></a>",
2041 {
"",
"",
"",
"",
"" }},
2046 {
"<a><![CDATA[data]]></a>",
2048 {
"<?xml version=\"1.0\" ?><a/>",
2052 {
"<a><!-- comment --></a>",
2086 ok(
local !=
NULL,
"Unexpected NULL local name pointer\n");
2090 hr = IXmlReader_GetQualifiedName(
reader, &qname, &length2);
2092 ok(qname !=
NULL,
"Unexpected NULL qualified name pointer\n");
2099 ok(*
local != 0,
"Unexpected empty local name\n");
2100 ok(
length > 0,
"Unexpected local name length\n");
2102 ok(*qname != 0,
"Unexpected empty qualified name\n");
2103 ok(length2 > 0,
"Unexpected qualified name length\n");
2113 IXmlReader_Release(
reader);
2118 static const char testA[] =
"<a b=\"c\">dză></a>";
2119 static const WCHAR chardataW[] = {0x01f3,0x0103,
'>',0};
2150 IXmlReader_Release(
reader);
2155 static const struct encoding_testW
2161 { {
'<',
'?',
'p',
'i',
' ',
'?',
'>',0 } },
2162 { {
'<',
'!',
'-',
'-',
' ',
'c',
'-',
'-',
'>',0 } },
2163 { { 0xfeff,
'<',
'a',
'/',
'>',0 } },
2164 { {
'<',
'a',
'/',
'>',0 } },
2166 static const char *encoding_testsA[] =
2209 IXmlReader_Release(
reader);
2217 ok(IXmlReader_IsEOF(
reader) ==
eof,
"Unexpected IsEOF() result\n");
2219 ok(
hr ==
S_OK,
"GetProperty() failed, %#x\n",
hr);
2257 IXmlReader_Release(
reader);
2281 IXmlReader_Release(
reader);
2286 static const char *xml =
2353 hr = IXmlReader_MoveToFirstAttribute(
reader);
2360 hr = IXmlReader_Read(
reader, &nodetype);
2365 hr = IXmlReader_Read(
reader, &nodetype);
2384 IXmlReader_Release(
reader);
2389 static const char *xml =
"<c:a xmlns:c=\"nsdef c\" b=\"attr b\">\n</c:a>";
2408 hr = IXmlReader_GetLinePosition(
reader, &position);
2410 ok(position == 0,
"got %u\n", position);
2413 hr = IXmlReader_GetLineNumber(
reader, &position);
2415 ok(position == 0,
"got %u\n", position);
2450 IXmlReader_Release(
reader);
2455 const WCHAR *
ns, *nsq, *
empty, *xmlns_ns, *xmlns_name, *
name, *
p, *
q, *xml, *
ptr, *
value;
2475 win_skip(
"attr value is different than namespace pointer, assuming old xmllite\n");
2476 IXmlReader_Release(
reader);
2479 ok(
ns ==
ptr,
"ns != value\n");
2502 set_input_string(
reader,
"<elem xmlns:p=\"myns\" xmlns:q=\"mynsq\"><p:elem2 q:attr=\"\"></p:elem2></elem>");
2556 ok(
ns+1 ==
p,
"ns+1 != p\n");
2570 IXmlReader_Release(
reader);
2575 static const char *xml =
"<a><elem xmlns=\"myns\" a=\"value a\" b=\"value b\" xmlns:ns=\"ns uri\" " 2576 "ns:c=\"value c\" c=\"value c2\"/></a>";
2577 static const WCHAR xmlns_uriW[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'w',
'w',
'.',
'w',
'3',
'.',
'o',
'r',
'g',
'/',
2578 '2',
'0',
'0',
'0',
'/',
'x',
'm',
'l',
'n',
's',
'/',0};
2579 static const WCHAR nsuriW[] = {
'n',
's',
' ',
'u',
'r',
'i',0};
2580 static const WCHAR xmlnsW[] = {
'x',
'm',
'l',
'n',
's',0};
2581 static const WCHAR mynsW[] = {
'm',
'y',
'n',
's',0};
2582 static const WCHAR nsW[] = {
'n',
's',0};
2584 static const WCHAR aW[] = {
'a',0};
2585 static const WCHAR bW[] = {
'b',0};
2586 static const WCHAR cW[] = {
'c',0};
2591 ok(
hr ==
S_OK,
"Failed to create reader, hr %#x.\n",
hr);
2611 hr = IXmlReader_MoveToAttributeByName(
reader,
NULL, xmlns_uriW);
2614 hr = IXmlReader_MoveToAttributeByName(
reader,
emptyW, xmlns_uriW);
2620 hr = IXmlReader_MoveToAttributeByName(
reader,
xmlnsW, xmlns_uriW);
2628 hr = IXmlReader_MoveToAttributeByName(
reader, bW,
NULL);
2632 hr = IXmlReader_MoveToAttributeByName(
reader,
aW, mynsW);
2635 hr = IXmlReader_MoveToAttributeByName(
reader, nsW,
NULL);
2638 hr = IXmlReader_MoveToAttributeByName(
reader, nsW, xmlns_uriW);
2646 hr = IXmlReader_MoveToAttributeByName(
reader, cW,
NULL);
2650 hr = IXmlReader_MoveToAttributeByName(
reader, cW, nsuriW);
2654 IXmlReader_Release(
reader);
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static void test_read_xmldeclaration(void)
static const char test_public_dtd[]
static input_iids_t input_iids
static void test_read_comment(void)
static HRESULT WINAPI teststream_QueryInterface(ISequentialStream *iface, REFIID riid, void **obj)
static const ISequentialStreamVtbl teststreamvtbl
static HRESULT WINAPI teststream_Read(ISequentialStream *iface, void *pv, ULONG cb, ULONG *pread)
static void ok_iids_(const input_iids_t *iids, const IID **expected, const IID **exp_broken, BOOL todo, int line)
static ULONG WINAPI teststream_Release(ISequentialStream *iface)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
static const char xmldecl_short[]
static const char * state_to_str(XmlReadState state)
static ULONG WINAPI teststream_AddRef(ISequentialStream *iface)
static void test_read_element(void)
#define reader_name(a, b)
static ULONG WINAPI resolver_AddRef(IXmlResolver *iface)
ACPI_SIZE strlen(const char *String)
static const uri_properties uri_tests[]
static void free_str(WCHAR *str)
#define reader_prefix(a, b)
static void test_read_attribute(void)
GLdouble GLdouble GLdouble r
char * wine_dbgstr_w(const wchar_t *wstr)
static struct test_entry element_tests[]
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
GLuint GLuint GLsizei count
ssize_t pread(int fd, void *buf, size_t count, off_t offset)
DEFINE_GUID(IID_IXmlReaderInput, 0x0b3ccc9b, 0x9214, 0x428b, 0xa2, 0xae, 0xef, 0x3a, 0xa8, 0x71, 0xaf, 0xda)
static void test_reader_create(void)
static void _read_value_char(IXmlReader *reader, WCHAR expected_char, unsigned line)
#define ok_iids(got, exp, brk, todo)
static void test_reader_position(void)
const char * wine_dbgstr_guid(const GUID *guid)
static const WCHAR * _reader_value(unsigned line, IXmlReader *reader, const char *expect)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define TEST_DEPTH2(reader, depth, brk)
static void test_readvaluechunk(void)
static struct test_entry pi_tests[]
static const WCHAR * _reader_namespace(unsigned line, IXmlReader *reader, const char *expect)
static void test_read_public_dtd(void)
static const struct IUnknownVtbl testinput_vtbl
static HRESULT testinput_createinstance(void **ppObj)
#define TEST_READER_POSITION(reader, line, pos)
static int stream_readcall
static void test_read_cdata(void)
static const WCHAR * _reader_name(unsigned line, IXmlReader *reader, const char *expect)
static void * heap_alloc(size_t len)
HRESULT WINAPI CreateXmlReader(REFIID riid, void **obj, IMalloc *imalloc)
static void _read_node(unsigned line, IXmlReader *reader, XmlNodeType expected_type)
GLsizei GLsizei GLuint * obj
static WCHAR * a2w(const char *str)
#define set_input_string(a, b)
HRESULT WINAPI CreateXmlReaderInputWithEncodingName(IUnknown *stream, IMalloc *imalloc, LPCWSTR encoding, BOOL hint, LPCWSTR base_uri, IXmlReaderInput **ppInput)
#define reader_qname(a, b)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void test_read_state(IXmlReader *reader, XmlReadState expected, XmlReadState exp_broken, int line)
static struct test_entry attributes_tests[]
static const CHAR testA[]
#define next_attribute(a)
static void _next_attribute(unsigned line, IXmlReader *reader)
static ULONG WINAPI testinput_Release(IUnknown *iface)
static struct nodes_test misc_test
static void test_reader_depth(IXmlReader *reader, UINT depth, UINT brk, int line)
GLenum GLuint GLenum GLsizei length
static void test_readerinput(void)
struct _testinput testinput
#define reader_namespace(a, b)
static void test_string_pointers(void)
static const char xmldecl_full[]
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static const IID * setinput_full[]
static void test_read_system_dtd(void)
#define todo_wine_if(is_todo)
GLboolean GLboolean GLboolean b
static const WCHAR * _reader_qname(IXmlReader *reader, const char *expect, unsigned line)
static void test_read_full(void)
#define TEST_READER_POSITION2(reader, line, pos, line_broken, pos_broken)
static void test_reader_state(void)
static ULONG WINAPI testinput_AddRef(IUnknown *iface)
static HRESULT WINAPI teststream_Write(ISequentialStream *iface, const void *pv, ULONG cb, ULONG *written)
GLdouble GLdouble GLdouble GLdouble q
static const char * type_to_str(XmlNodeType type)
#define move_to_element(a)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
static void test_isemptyelement(void)
static void test_read_text(void)
GLint GLint GLsizei GLsizei GLsizei depth
struct nodes_test::@1728 nodes[20]
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
#define InterlockedDecrement
static const IID * empty_seq[]
static void _set_input_string(unsigned line, IXmlReader *reader, const char *xml)
#define memcpy(s1, s2, n)
GLsizei const GLfloat * value
#define TEST_READER_STATE2(reader, state, brk)
static testinput * impl_from_IUnknown(IUnknown *iface)
static const char misc_test_xml[]
static struct test_entry comment_tests[]
static void test_attribute_by_name(void)
static int strcmp_wa(const WCHAR *str1, const char *stra)
static HRESULT WINAPI resolver_ResolveUri(IXmlResolver *iface, const WCHAR *base_uri, const WCHAR *public_id, const WCHAR *system_id, IUnknown **input)
_Check_return_ _CRTIMP int __cdecl __cdecl eof(_In_ int _FileHandle)
static ULONG WINAPI resolver_Release(IXmlResolver *iface)
static IXmlResolver testresolver
static void _move_to_element(unsigned line, IXmlReader *reader)
static void test_reader_properties(void)
#define InterlockedIncrement
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define reader_value(a, b)
static void test_eof_state(IXmlReader *reader, BOOL eof)
static void test_endoffile(void)
static const IID * setinput_full_old[]
static HRESULT WINAPI resolver_QI(IXmlResolver *iface, REFIID riid, void **obj)
#define expect(expected, got)
static void test_prefix(void)
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
static struct test_entry cdata_tests[]
static void test_namespaceuri(void)
static void test_reader_pos(IXmlReader *reader, UINT line, UINT pos, UINT line_broken, UINT pos_broken, int _line_)
#define MultiByteToWideChar
struct input_iids_t input_iids_t
static HMODULE MODULEINFO DWORD cb
static const char test_system_dtd[]
static void test_read_pi(void)
static HRESULT WINAPI testinput_QueryInterface(IUnknown *iface, REFIID riid, void **ppvObj)
static ISequentialStream teststream
static void test_read_pending(void)
static struct test_entry text_tests[]
GLuint GLuint GLsizei GLenum type
static const IXmlResolverVtbl resolvervtbl
static struct test_entry_empty empty_element_tests[]
static const IID * setinput_readerinput[]
#define TEST_DEPTH(reader, depth)
static void test_encoding_detection(void)
static const WCHAR * _reader_prefix(unsigned line, IXmlReader *reader, const char *expect)
#define TEST_READER_STATE(reader, state)
static IStream * create_stream_on_data(const void *data, unsigned int size)
#define IsEqualIID(riid1, riid2)
static void test_read_charref(void)
static void test_max_element_depth(void)
static BOOL heap_free(void *mem)
#define read_value_char(a, b)
GLuint const GLchar * name