From 5ff56a6d68ce6fbab0980232d95b5d190e2ecdcf Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sun, 9 May 2010 20:37:49 +0000 Subject: Removed document order optimization (it helps on a tiny percentage of queries), XPath tests now compute their own order git-svn-id: http://pugixml.googlecode.com/svn/trunk@400 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_xpath.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'tests/test_xpath.cpp') diff --git a/tests/test_xpath.cpp b/tests/test_xpath.cpp index 7ef34ec..e2c5edb 100644 --- a/tests/test_xpath.cpp +++ b/tests/test_xpath.cpp @@ -8,24 +8,6 @@ #include -TEST_XML(xpath_document_order, "test") -{ - CHECK(xml_node().document_order() == 0); - CHECK(doc.child(STR("node")).document_order() == 0); - CHECK(doc.document_order() == 0); - - doc.precompute_document_order(); - - CHECK(doc.document_order() == 1); - CHECK(doc.child(STR("node")).document_order() == 2); - CHECK(doc.child(STR("node")).child(STR("child1")).document_order() == 3); - CHECK(doc.child(STR("node")).child(STR("child1")).attribute(STR("attr1")).document_order() == 4); - CHECK(doc.child(STR("node")).child(STR("child1")).attribute(STR("attr2")).document_order() == 5); - CHECK(doc.child(STR("node")).child(STR("child2")).document_order() == 6); - CHECK(doc.child(STR("node")).child(STR("child2")).attribute(STR("attr1")).document_order() == 7); - CHECK(doc.child(STR("node")).child(STR("child2")).first_child().document_order() == 8); -} - TEST(xpath_allocator_many_pages) { pugi::string_t query = STR("0"); @@ -55,8 +37,6 @@ TEST_XML(xpath_sort_complex, "") ns.sort(false); xpath_node_set sorted = ns; - doc.precompute_document_order(); - xpath_node_set_tester(sorted, "sorted order failed") % 3 % 4 % 5; xpath_node_set_tester(reverse_sorted, "reverse sorted order failed") % 5 % 4 % 3; } -- cgit v1.2.3