Commit e97ef040 authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

xmllite/tests: Test depth for MoveToAttributeByName().

parent ef0eb994
...@@ -2570,11 +2570,13 @@ static void test_attribute_by_name(void) ...@@ -2570,11 +2570,13 @@ static void test_attribute_by_name(void)
ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element); read_node(reader, XmlNodeType_Element);
TEST_DEPTH(reader, 0);
hr = IXmlReader_MoveToAttributeByName(reader, L"", NULL); hr = IXmlReader_MoveToAttributeByName(reader, L"", NULL);
ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr); ok(hr == S_FALSE, "Unexpected hr %#lx.\n", hr);
read_node(reader, XmlNodeType_Element); read_node(reader, XmlNodeType_Element);
TEST_DEPTH(reader, 1);
hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL); hr = IXmlReader_MoveToAttributeByName(reader, NULL, NULL);
ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr); ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
...@@ -2590,14 +2592,17 @@ static void test_attribute_by_name(void) ...@@ -2590,14 +2592,17 @@ static void test_attribute_by_name(void)
hr = IXmlReader_MoveToAttributeByName(reader, L"xmlns", xmlns_uriW); hr = IXmlReader_MoveToAttributeByName(reader, L"xmlns", xmlns_uriW);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"myns"); reader_value(reader, L"myns");
hr = IXmlReader_MoveToAttributeByName(reader, L"a", NULL); hr = IXmlReader_MoveToAttributeByName(reader, L"a", NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"value a"); reader_value(reader, L"value a");
hr = IXmlReader_MoveToAttributeByName(reader, L"b", NULL); hr = IXmlReader_MoveToAttributeByName(reader, L"b", NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"value b"); reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, L"a", L"myns"); hr = IXmlReader_MoveToAttributeByName(reader, L"a", L"myns");
...@@ -2608,18 +2613,22 @@ static void test_attribute_by_name(void) ...@@ -2608,18 +2613,22 @@ static void test_attribute_by_name(void)
hr = IXmlReader_MoveToAttributeByName(reader, L"ns", xmlns_uriW); hr = IXmlReader_MoveToAttributeByName(reader, L"ns", xmlns_uriW);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"ns uri"); reader_value(reader, L"ns uri");
hr = IXmlReader_MoveToAttributeByName(reader, L"b", L""); hr = IXmlReader_MoveToAttributeByName(reader, L"b", L"");
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"value b"); reader_value(reader, L"value b");
hr = IXmlReader_MoveToAttributeByName(reader, L"c", NULL); hr = IXmlReader_MoveToAttributeByName(reader, L"c", NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"value c2"); reader_value(reader, L"value c2");
hr = IXmlReader_MoveToAttributeByName(reader, L"c", L"ns uri"); hr = IXmlReader_MoveToAttributeByName(reader, L"c", L"ns uri");
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine TEST_DEPTH(reader, 2);
reader_value(reader, L"value c"); reader_value(reader, L"value c");
IXmlReader_Release(reader); IXmlReader_Release(reader);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment