Lines Matching refs:XMLTest
30 bool XMLTest (const char* testString, const char* expected, const char* found, bool echo=true, bool… in XMLTest() function
65 bool XMLTest(const char* testString, XMLError expected, XMLError found, bool echo = true, bool extr… in XMLTest() function
67 …return XMLTest(testString, XMLDocument::ErrorIDToName(expected), XMLDocument::ErrorIDToName(found)… in XMLTest()
70 bool XMLTest(const char* testString, bool expected, bool found, bool echo = true, bool extraNL = fa… in XMLTest() function
72 … return XMLTest(testString, expected ? "true" : "false", found ? "true" : "false", echo, extraNL); in XMLTest()
75 template< class T > bool XMLTest( const char* testString, T expected, T found, bool echo=true ) in XMLTest() function
308 XMLTest( "No leaks on start?", FALSE, leaksOnStart ); in main()
348 XMLTest( "Example_1", 0, example_1() ); in main()
349 XMLTest( "Example_2", 0, example_2() ); in main()
350 XMLTest( "Example_3", 0, example_3() ); in main()
351 XMLTest( "Example_4", true, example_4() ); in main()
376 XMLTest( "Element test", false, doc.Error() ); in main()
391 XMLTest( "Hello world declaration", false, doc.Error() ); in main()
427 XMLTest( "Element text before", false, doc.Error() ); in main()
437 XMLTest( "Element with sub element", false, doc->Error() ); in main()
445 XMLTest( "New element", true, first != 0 ); in main()
447 XMLTest( "New element inserted first", true, firstAfterInsertion == first ); in main()
450 XMLTest( "New element", true, last != 0 ); in main()
452 XMLTest( "New element inserted last", true, lastAfterInsertion == last ); in main()
455 XMLTest( "New element", true, middle != 0 ); in main()
457 XMLTest( "New element inserted middle", true, middleAfterInsertion == middle ); in main()
487 …XMLTest( "Programmatic DOM", "comment", doc->FirstChildElement( "element" )->FirstChild()->Value()… in main()
488 …XMLTest( "Programmatic DOM", "0", doc->FirstChildElement( "element" )->FirstChildElement()->Attrib… in main()
489 …XMLTest( "Programmatic DOM", 2, doc->FirstChildElement()->LastChildElement( "sub" )->IntAttribute(… in main()
490 XMLTest( "Programmatic DOM", "& Text!", in main()
492 XMLTest("User data - pointer", true, &dummyValue == comment->GetUserData(), false); in main()
493 XMLTest("User data - value behind pointer", dummyInitialValue, dummyValue, false); in main()
502 …XMLTest( "Programmatic DOM", true, doc->FirstChildElement()->FirstChildElement()->BoolAttribute( "… in main()
508 XMLTest( "Programmatic DOM", XML_NO_ATTRIBUTE, result ); in main()
509 XMLTest( "Programmatic DOM", defaultIntValue, value1 ); in main()
510 XMLTest( "Programmatic DOM", replacementIntValue, value2 ); in main()
522 …XMLTest( "Compact mode", "<element><sub attrib=\"true\"/><sub/></element>", streamer.CStr(), false… in main()
525 XMLTest( "Save pretty.xml", false, doc->Error() ); in main()
527 XMLTest( "Save compact.xml", false, doc->Error() ); in main()
537 XMLTest( "Load dream.xml", false, doc.Error() ); in main()
540 XMLTest( "Save dreamout.xml", false, doc.Error() ); in main()
543 XMLTest( "Dream", "xml version=\"1.0\"", in main()
545 XMLTest( "Dream", true, doc.FirstChild()->NextSibling()->ToUnknown() != 0 ); in main()
546 XMLTest( "Dream", "DOCTYPE PLAY SYSTEM \"play.dtd\"", in main()
548 XMLTest( "Dream", "And Robin shall restore amends.", in main()
550 XMLTest( "Dream", "And Robin shall restore amends.", in main()
555 XMLTest( "Load dreamout.xml", false, doc2.Error() ); in main()
556 XMLTest( "Dream-out", "xml version=\"1.0\"", in main()
558 XMLTest( "Dream-out", true, doc2.FirstChild()->NextSibling()->ToUnknown() != 0 ); in main()
559 XMLTest( "Dream-out", "DOCTYPE PLAY SYSTEM \"play.dtd\"", in main()
561 XMLTest( "Dream-out", "And Robin shall restore amends.", in main()
576 XMLTest( "Bad XML", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); in main()
578 XMLTest("Formatted error string", in main()
588 XMLTest( "Top level attributes", false, doc.Error() ); in main()
597 XMLTest( "Query attribute: int as double", XML_SUCCESS, result); in main()
598 XMLTest( "Query attribute: int as double", 1, (int)dVal ); in main()
599 XMLTest( "Query attribute: int as double", 1, (int)ele->DoubleAttribute("attr0")); in main()
602 XMLTest( "Query attribute: double as double", XML_SUCCESS, result); in main()
603 XMLTest( "Query attribute: double as double", 2.0, dVal ); in main()
604 XMLTest( "Query attribute: double as double", 2.0, ele->DoubleAttribute("attr1") ); in main()
607 XMLTest( "Query attribute: double as int", XML_SUCCESS, result); in main()
608 XMLTest( "Query attribute: double as int", 2, iVal ); in main()
611 XMLTest( "Query attribute: not a number", XML_WRONG_ATTRIBUTE_TYPE, result ); in main()
612 XMLTest( "Query attribute: not a number", 4.0, ele->DoubleAttribute("attr2", 4.0) ); in main()
615 XMLTest( "Query attribute: does not exist", XML_NO_ATTRIBUTE, result ); in main()
616 XMLTest( "Query attribute: does not exist", true, ele->BoolAttribute("bar", true) ); in main()
624 XMLTest( "Empty top element", false, doc.Error() ); in main()
638 XMLTest( "Query int attribute", XML_SUCCESS, queryResult); in main()
642 XMLTest( "Query double attribute", XML_SUCCESS, queryResult); in main()
647 XMLTest( "Query int attribute generic", (int)XML_SUCCESS, queryResult); in main()
651 XMLTest( "Query double attribute generic", (int)XML_SUCCESS, queryResult); in main()
654 XMLTest( "Attribute match test", "strValue", ele->Attribute( "str", "strValue" ) ); in main()
655 XMLTest( "Attribute round trip. c-string.", "strValue", cStr ); in main()
656 XMLTest( "Attribute round trip. int.", 1, iVal ); in main()
657 XMLTest( "Attribute round trip. double.", -1, (int)dVal ); in main()
658 XMLTest( "Alternate query", true, iVal == iVal2 ); in main()
659 XMLTest( "Alternate query", true, dVal == dVal2 ); in main()
660 XMLTest( "Alternate query", true, iVal == ele->IntAttribute("int") ); in main()
661 XMLTest( "Alternate query", true, dVal == ele->DoubleAttribute("double") ); in main()
667 XMLTest( "Load utf8test.xml", false, doc.Error() ); in main()
674 XMLTest( "UTF-8: Russian value.", (const char*)correctValue, element->Attribute( "value" ) ); in main()
683 XMLTest( "UTF-8: Browsing russian element name.", in main()
689 XMLTest( "UTF-8: Save testout.xml", false, doc.Error() ); in main()
695 XMLTest( "UTF-8: Open utf8testout.xml", true, saved != 0 ); in main()
698 XMLTest( "UTF-8: Open utf8testverify.xml", true, verify != 0 ); in main()
724 XMLTest( "UTF-8: Verified multi-language round trip.", true, roundTripOkay ); in main()
732 XMLTest( "Double whitespace", false, doc.Error() ); in main()
735 XMLTest( "GetText() normal use.", "This is text", element->GetText() ); in main()
739 XMLTest( "Bold text simulation", false, doc.Error() ); in main()
742 XMLTest( "GetText() contained element.", element->GetText() == 0, true ); in main()
751 XMLTest( "Empty closed element", false, doc.Error() ); in main()
755 XMLTest( "SetText() normal use (open/close).", "darkness.", element->GetText() ); in main()
758 XMLTest( "SetText() replace.", "blue flame.", element->GetText() ); in main()
762 XMLTest( "Empty self-closed element", false, doc.Error() ); in main()
766 XMLTest( "SetText() normal use. (self-closing)", "The driver", element->GetText() ); in main()
769 XMLTest( "SetText() replace with tag-like text.", "<b>horses</b>", element->GetText() ); in main()
774 XMLTest( "Text in nested element", false, doc.Error() ); in main()
778 XMLTest( "SetText() prefix to nested non-text children.", "wolves", element->GetText() ); in main()
782 XMLTest( "Empty self-closed element round 2", false, doc.Error() ); in main()
786 XMLTest( "SetText types", "str", element->GetText() ); in main()
789 XMLTest( "SetText types", "1", element->GetText() ); in main()
792 XMLTest( "SetText types", "1", element->GetText() ); in main()
795 XMLTest( "SetText types", "true", element->GetText() ); in main()
798 XMLTest( "SetText types", "1.5", element->GetText() ); in main()
801 XMLTest( "SetText types", "1.5", element->GetText() ); in main()
817 XMLTest("Attribute: int", XML_SUCCESS, queryResult, true); in main()
818 XMLTest("Attribute: int", -100, v, true); in main()
823 XMLTest("Attribute: int", (int)XML_SUCCESS, queryResult, true); in main()
824 XMLTest("Attribute: int", -100, v, true); in main()
826 XMLTest("Attribute: int", -100, element->IntAttribute("attrib"), true); in main()
833 XMLTest("Attribute: unsigned", XML_SUCCESS, queryResult, true); in main()
834 XMLTest("Attribute: unsigned", unsigned(100), v, true); in main()
839 XMLTest("Attribute: unsigned", (int)XML_SUCCESS, queryResult, true); in main()
840 XMLTest("Attribute: unsigned", unsigned(100), v, true); in main()
845 XMLTest("Attribute: string default", false, queryResult == XML_SUCCESS); in main()
847 XMLTest("Attribute: string", XML_SUCCESS, queryResult, true); in main()
848 XMLTest("Attribute: string", "100", v); in main()
850 XMLTest("Attribute: unsigned", unsigned(100), element->UnsignedAttribute("attrib"), true); in main()
857 XMLTest("Attribute: int64_t", XML_SUCCESS, queryResult, true); in main()
858 XMLTest("Attribute: int64_t", BIG, v, true); in main()
863 XMLTest("Attribute: int64_t", (int)XML_SUCCESS, queryResult, true); in main()
864 XMLTest("Attribute: int64_t", BIG, v, true); in main()
866 XMLTest("Attribute: int64_t", BIG, element->Int64Attribute("attrib"), true); in main()
873 XMLTest("Attribute: uint64_t", XML_SUCCESS, queryResult, true); in main()
874 XMLTest("Attribute: uint64_t", BIG_POS, v, true); in main()
879 XMLTest("Attribute: uint64_t", (int)XML_SUCCESS, queryResult, true); in main()
880 XMLTest("Attribute: uint64_t", BIG_POS, v, true); in main()
882 XMLTest("Attribute: uint64_t", BIG_POS, element->Unsigned64Attribute("attrib"), true); in main()
889 XMLTest("Attribute: bool", XML_SUCCESS, queryResult, true); in main()
890 XMLTest("Attribute: bool", true, v, true); in main()
895 XMLTest("Attribute: bool", (int)XML_SUCCESS, queryResult, true); in main()
896 XMLTest("Attribute: bool", true, v, true); in main()
898 XMLTest("Attribute: bool", true, element->BoolAttribute("attrib"), true); in main()
903 XMLTest("Bool true is 'true'", "true", result); in main()
908 XMLTest("Bool true is '1'", "1", result); in main()
917 XMLTest("Attribute: double", XML_SUCCESS, queryResult, true); in main()
918 XMLTest("Attribute: double", 100.0, v, true); in main()
923 XMLTest("Attribute: bool", (int)XML_SUCCESS, queryResult, true); in main()
924 XMLTest("Attribute: double", 100.0, v, true); in main()
926 XMLTest("Attribute: double", 100.0, element->DoubleAttribute("attrib"), true); in main()
933 XMLTest("Attribute: float", XML_SUCCESS, queryResult, true); in main()
934 XMLTest("Attribute: float", 100.0f, v, true); in main()
939 XMLTest("Attribute: float", (int)XML_SUCCESS, queryResult, true); in main()
940 XMLTest("Attribute: float", 100.0f, v, true); in main()
942 XMLTest("Attribute: float", 100.0f, element->FloatAttribute("attrib"), true); in main()
948 XMLTest("Element: int64_t", XML_SUCCESS, queryResult, true); in main()
949 XMLTest("Element: int64_t", BIG, v, true); in main()
955 XMLTest("Element: uint64_t", XML_SUCCESS, queryResult, true); in main()
956 XMLTest("Element: uint64_t", BIG_POS, v, true); in main()
964 XMLTest("Open printer.xml", true, printerfp != 0); in main()
980 XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true); in main()
985 XMLTest("attrib-text", "text", attrib->Value(), true); in main()
987 XMLTest("attrib-int", int(1), attrib->IntValue(), true); in main()
989 XMLTest("attrib-unsigned", unsigned(2), attrib->UnsignedValue(), true); in main()
991 XMLTest("attrib-int64", int64_t(3), attrib->Int64Value(), true); in main()
993 XMLTest("attrib-uint64", uint64_t(37), attrib->Unsigned64Value(), true); in main()
995 XMLTest("attrib-bool", true, attrib->BoolValue(), true); in main()
997 XMLTest("attrib-double", 4.0, attrib->DoubleValue(), true); in main()
1051 XMLTest("XMLPrinter Stream mode: load", XML_SUCCESS, doc.ErrorID(), true); in main()
1059 XMLTest("PushText( const char* text, bool cdata=false ) test", "Tinyxml2", text_value); in main()
1063 XMLTest("PushText( int value ) test", 11, int_value); in main()
1067 XMLTest("PushText( unsigned value ) test", (unsigned)12, unsigned_value); in main()
1071 XMLTest("PushText( int64_t value ) test", (int64_t) 13, int64_t_value); in main()
1075 XMLTest("PushText( uint64_t value ) test", (uint64_t) 14, uint64_t_value); in main()
1079 XMLTest("PushText( float value ) test", 1.56f, float_value); in main()
1083 XMLTest("PushText( double value ) test", 12.12, double_value); in main()
1087 XMLTest("PushText( bool value ) test", true, bool_value); in main()
1091 XMLTest("PushComment() test", "this is Tinyxml2", comment_value); in main()
1095 XMLTest("PushDeclaration() test", "version = '1.0' enconding = 'utf-8'", declaration_value); in main()
1110 XMLTest( "CDATA symbolic puns round 1", false, doc.Error() ); in main()
1113 XMLTest( "CDATA parse.", "I am > the rules!\n...since I make symbolic puns", in main()
1128 XMLTest( "CDATA symbolic puns round 2", false, doc.Error() ); in main()
1131 XMLTest( "CDATA parse. [ tixml1:1480107 ]", in main()
1148 XMLTest( "InsertEndChild() return", true, childNode0 == childText0 ); in main()
1150 XMLTest( "InsertAfterChild() return", true, childNode1 == childText1 ); in main()
1152 XMLTest( "Test InsertAfterChild on empty node. ", true, ( childNode1 == parent->LastChild() ) ); in main()
1168 XMLTest( "Entity transformation parse round 1", false, doc.Error() ); in main()
1173 XMLTest( "Entity transformation: read. ", expected, context, true ); in main()
1177 XMLTest( "Entity transformation: open text file for writing", true, textfile != 0, true ); in main()
1183 XMLTest( "Entity transformation: Accept", true, acceptResult ); in main()
1187 XMLTest( "Entity transformation: open text file for reading", true, textfile != 0, true ); in main()
1192 XMLTest( "Entity transformation: write. ", in main()
1210 XMLTest( "Entity transformation parse round 2", false, doc.Error() ); in main()
1212 XMLTest( "No entity parsing.", in main()
1215 XMLTest( "No entity parsing.", "Crazy &ttk;", in main()
1225 XMLTest( "dot in names", false, doc.Error() ); in main()
1226 XMLTest( "dot in names", "a.elem", doc.FirstChildElement()->Name() ); in main()
1227 XMLTest( "dot in names", "2.0", doc.FirstChildElement()->Attribute( "xmi.version" ) ); in main()
1235 XMLTest( "fin thickness", false, doc.Error() ); in main()
1238 XMLTest( "Entity with one digit.", in main()
1255 XMLTest( "PLAY SYSTEM parse", false, doc.Error() ); in main()
1257 XMLTest( "PLAY SYSTEM save", false, doc.Error() ); in main()
1260 XMLTest( "PLAY SYSTEM load", false, doc.Error() ); in main()
1264 XMLTest( "Correct value of unknown.", "DOCTYPE PLAY SYSTEM 'play.dtd'", decl->Value() ); in main()
1274 XMLTest( "Comment somewhat evil", false, doc.Error() ); in main()
1278 XMLTest( "Comment formatting.", " Somewhat<evil> ", comment->Value() ); in main()
1287 …XMLTest( "Parsing repeated attributes.", XML_ERROR_PARSING_ATTRIBUTE, doc.ErrorID() ); // is an e… in main()
1297 XMLTest( "Embedded null throws error.", true, doc.Error() ); in main()
1305 XMLTest( "Empty document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1309 XMLTest("Error string should be set", in main()
1319 XMLTest( "All whitespaces document error", XML_ERROR_EMPTY_DOCUMENT, doc.ErrorID() ); in main()
1326 XMLTest( "Hex values", false, doc.Error() ); in main()
1328 XMLTest( "Low entities.", result, doc.FirstChildElement()->GetText() ); in main()
1336 XMLTest( "Throw error with bad end quotes.", true, doc.Error() ); in main()
1343 XMLTest("Missing end tag at end of input", true, xml.Error()); in main()
1345 XMLTest("Missing end tag with trailing whitespace", true, xml.Error()); in main()
1347 XMLTest("Mismatched tags", XML_ERROR_MISMATCHED_ELEMENT, xml.ErrorID() ); in main()
1356 XMLTest( "Declarations for head and body", false, xml.Error() ); in main()
1363 XMLTest( "Comments ignore entities.", " declarations for <head> & <body> ", c0->Value(), true ); in main()
1364 XMLTest( "Comments ignore entities.", " far & away ", c1->Value(), true ); in main()
1374 XMLTest( "Comments iteration", false, xml.Error() ); in main()
1386 XMLTest( "Comments iterate correctly.", 3, count ); in main()
1397 XMLTest( "Broken CDATA", true, doc.Error() ); in main()
1406 XMLTest( "Handle end tag whitespace", false, xml.Error() ); in main()
1413 XMLTest( "No closing element", true, xml.Error() ); in main()
1414 XMLTest( "Infinite loop test.", true, true ); in main()
1421 XMLTest( "Trailing DOCTYPE", false, doc.Error() ); in main()
1436 XMLTest( "Clone and Equal", true, a->ShallowEqual( b )); in main()
1438 XMLTest( "Clone and Equal", 4, count ); in main()
1455 XMLTest( "Parse before deep cloning root element", false, doc.Error() ); in main()
1464 XMLTest("Deep clone of element.", printer1.CStr(), printer2.CStr(), true); in main()
1482 XMLTest( "Parse before deep cloning sub element", false, doc.Error() ); in main()
1486 XMLTest( "Accept before deep cloning", true, acceptResult ); in main()
1494 XMLTest("Deep clone of sub-element.", printer1.CStr(), printer2.CStr(), true); in main()
1513 XMLTest( "Parse before deep cloning document", false, doc.Error() ); in main()
1521 XMLTest("DeepCopy of document.", printer1.CStr(), printer2.CStr(), true); in main()
1532 XMLTest( "Error in snprinf handling.", true, doc.Error() ); in main()
1540 XMLTest( "Parse for attribute ordering", false, doc.Error() ); in main()
1544 XMLTest( "Attribute order", "1", a->Value() ); in main()
1546 XMLTest( "Attribute order", "2", a->Value() ); in main()
1548 XMLTest( "Attribute order", "3", a->Value() ); in main()
1549 XMLTest( "Attribute order", "attrib3", a->Name() ); in main()
1553 XMLTest( "Attribute order", "1", a->Value() ); in main()
1555 XMLTest( "Attribute order", "3", a->Value() ); in main()
1559 XMLTest( "Attribute order (empty)", true, ele->FirstAttribute() == 0 ); in main()
1569 XMLTest( "Parse attribute with space 1", false, doc0.Error() ); in main()
1572 XMLTest( "Parse attribute with space 2", false, doc1.Error() ); in main()
1575 XMLTest( "Parse attribute with space 3", false, doc2.Error() ); in main()
1579 XMLTest( "Attribute with space #1", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1581 XMLTest( "Attribute with space #2", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1583 XMLTest( "Attribute with space #3", "Test Attribute", ele->Attribute( "attribute1" ) ); in main()
1591 XMLTest( "Parse two elements with attribute", false, doc.Error() ); in main()
1596 XMLTest( "Infinite loop in shallow equal.", true, equal ); in main()
1604 XMLTest( "Handle, parse element with attribute and nested element", false, doc.Error() ); in main()
1608 XMLTest( "Handle, non-const, element is found", true, ele != 0 ); in main()
1609 XMLTest( "Handle, non-const, element name matches", "sub", ele->Value() ); in main()
1615 XMLTest( "Handle, non-const, element not found", true, ele == 0 ); in main()
1620 XMLTest( "Handle, const, element is found", true, ele != 0 ); in main()
1621 XMLTest( "Handle, const, element name matches", "sub", ele->Value() ); in main()
1627 XMLTest( "Handle, const, element not found", true, ele == 0 ); in main()
1640 XMLTest( "BOM and default declaration", result, printer.CStr(), false ); in main()
1641 XMLTest( "CStrSize", 42, printer.CStrSize(), false ); in main()
1647 XMLTest( "Ill formed XML", true, doc.Error() ); in main()
1659 XMLTest("IntText() test", -24, test1); in main()
1662 XMLTest("UnsignedText() test", static_cast<unsigned>(42), test2); in main()
1665 XMLTest("Int64Text() test", static_cast<int64_t>(38), test3); in main()
1668 XMLTest("DoubleText() test", 2.35, test4); in main()
1671 XMLTest("FloatText()) test", 2.35f, test5); in main()
1674 XMLTest("FloatText()) test", true, test6); in main()
1688 XMLTest("ShallowEqual() test",false,result); in main()
1690 XMLTest("ShallowEqual() test",true,result); in main()
1703 XMLTest("previousSiblingElement() test",true,ElementPlaylist != 0); in main()
1705 XMLTest("previousSiblingElement() test",true,pre == 0); in main()
1707 XMLTest("NextSiblingElement() test",true,ElementBlank != 0); in main()
1709 XMLTest("NextSiblingElement() test",true,next == 0); in main()
1711 XMLTest("PreviousSiblingElement test",true,ElementEntry != 0); in main()
1719 XMLTest( "Parse points", false, doc.Error() ); in main()
1726 XMLTest( "QueryIntText result", XML_SUCCESS, queryResult, false ); in main()
1727 XMLTest( "QueryIntText", 1, intValue, false ); in main()
1733 XMLTest( "QueryUnsignedText result", XML_SUCCESS, queryResult, false ); in main()
1734 XMLTest( "QueryUnsignedText", (unsigned)1, unsignedValue, false ); in main()
1740 XMLTest( "QueryFloatText result", XML_SUCCESS, queryResult, false ); in main()
1741 XMLTest( "QueryFloatText", 1.2f, floatValue, false ); in main()
1747 XMLTest( "QueryDoubleText result", XML_SUCCESS, queryResult, false ); in main()
1748 XMLTest( "QueryDoubleText", 1.2, doubleValue, false ); in main()
1754 XMLTest( "QueryBoolText result", XML_SUCCESS, queryResult, false ); in main()
1755 XMLTest( "QueryBoolText", true, boolValue, false ); in main()
1763 XMLTest( "Non-alpha element lead letter parses.", false, doc.Error() ); in main()
1770 XMLTest("Non-alpha attribute lead character parses.", false, doc.Error()); in main()
1777 XMLTest("Element names with lead digit fail to parse.", true, doc.Error()); in main()
1784 XMLTest( "Set length of incoming data", false, doc.Error() ); in main()
1789 XMLTest( "Document is initially empty", true, doc.NoChildren() ); in main()
1791 XMLTest( "Empty is empty after Clear()", true, doc.NoChildren() ); in main()
1793 XMLTest( "Load dream.xml", false, doc.Error() ); in main()
1794 XMLTest( "Document has something to Clear()", false, doc.NoChildren() ); in main()
1796 XMLTest( "Document Clear()'s", true, doc.NoChildren() ); in main()
1801 XMLTest( "No error initially", false, doc.Error() ); in main()
1803 XMLTest( "Error after invalid XML", true, doc.Error() ); in main()
1804 XMLTest( "Error after invalid XML", error, doc.ErrorID() ); in main()
1806 XMLTest( "No error after Clear()", false, doc.Error() ); in main()
1818 XMLTest( "Parse with whitespace collapsing and &apos", false, doc.Error() ); in main()
1825 XMLTest( "Whitespace collapse", "This is ' text '", parent->GetText() ); in main()
1846 XMLTest( "Parse with all whitespaces", false, doc.Error() ); in main()
1847 XMLTest( "Whitespace all space", true, 0 == doc.FirstChildElement()->FirstChild() ); in main()
1855 XMLTest( "Parse with self-closed element", false, doc.Error() ); in main()
1857 XMLTest( "Tracking unused elements", true, ele != 0, false ); in main()
1865 XMLTest( "Parse for printing of sub-element", false, doc.Error() ); in main()
1870 XMLTest( "Accept of sub-element", true, acceptResult ); in main()
1871 XMLTest( "Printing of sub-element", "<child>abc</child>\n", printer.CStr(), false ); in main()
1878 XMLTest( "Loading an empty file", XML_ERROR_EMPTY_DOCUMENT, error ); in main()
1879 …XMLTest( "Loading an empty file and ErrorName as string", "XML_ERROR_EMPTY_DOCUMENT", doc.ErrorNam… in main()
1888 XMLTest( "BOM preservation (parse)", XML_SUCCESS, doc.Parse( xml_bom_preservation ), false ); in main()
1892 … XMLTest( "BOM preservation (compare)", xml_bom_preservation, printer.CStr(), false, true ); in main()
1894 XMLTest( "Save bomtest.xml", false, doc.Error() ); in main()
1899 XMLTest( "Load bomtest.xml", false, doc.Error() ); in main()
1900 XMLTest( "BOM preservation (load)", true, doc.HasBOM(), false ); in main()
1904 … XMLTest( "BOM preservation (compare)", xml_bom_preservation, printer.CStr(), false, true ); in main()
1947 XMLTest( "Insertion with removal parse round 1", false, doc.Error() ); in main()
1953 XMLTest("Move node from within <one> to <two> - Accept()", true, acceptResult); in main()
1954 XMLTest("Move node from within <one> to <two>", xmlInsideTwo, printer1.CStr()); in main()
1957 XMLTest( "Insertion with removal parse round 2", false, doc.Error() ); in main()
1963 XMLTest("Move node from within <one> after <two> - Accept()", true, acceptResult); in main()
1964 XMLTest("Move node from within <one> after <two>", xmlAfterTwo, printer2.CStr(), false); in main()
1967 XMLTest( "Insertion with removal parse round 3", false, doc.Error() ); in main()
1973 XMLTest("Move node from within <one> after <one> - Accept()", true, acceptResult); in main()
1974 XMLTest("Move node from within <one> after <one>", xmlAfterOne, printer3.CStr(), false); in main()
1977 XMLTest( "Insertion with removal parse round 4", false, doc.Error() ); in main()
1980 …XMLTest("<two> is the last child at root level", true, two == doc.RootElement()->LastChildElement(… in main()
1984 XMLTest("Move node from within <one> after <two> - Accept()", true, acceptResult); in main()
1985 XMLTest("Move node from within <one> after <two>", xmlAfterTwo, printer4.CStr(), false); in main()
1994 XMLTest( "Parse svg with text", false, doc.Error() ); in main()
2003 XMLTest( "Parse root-sample-field0", true, doc.Error() ); in main()
2015 XMLTest( "Parse self-closed empty element", false, doc.Error() ); in main()
2052 XMLTest( "Parse hex no closing tag round 1", true, doc.Error() ); in main()
2057 XMLTest( "Parse hex no closing tag round 2", true, doc.Error() ); in main()
2072 XMLTest( "Node document before insertion", true, &doc == root->GetDocument() ); in main()
2074 XMLTest( "Node document after insertion", true, &doc == root->GetDocument() ); in main()
2097 XMLTest( "Parse hex with closing tag", false, doc.Error() ); in main()
2109 XMLTest( "printme - Accept()", true, acceptResult ); in main()
2116 XMLTest( "Issue 302. Should be no error initially", "XML_SUCCESS", doc.ErrorName() ); in main()
2118 XMLTest( "Issue 302. Fail to save", "XML_ERROR_FILE_COULD_NOT_BE_OPENED", doc.ErrorName() ); in main()
2120 XMLTest( "Issue 302. Subsequent success in saving", "XML_SUCCESS", doc.ErrorName() ); in main()
2127 XMLTest( "Should be no error initially", false, doc.Error() ); in main()
2129 XMLTest( "No such file - should fail", true, doc.Error() ); in main()
2132 XMLTest( "Error should be cleared", false, doc.Error() ); in main()
2152 XMLTest("Test that the code changes do not affect normal parsing", false, doc.Error() ); in main()
2154 XMLTest("Test that the second declaration is allowed", false, doc.Error() ); in main()
2156 …XMLTest("Test that declaration after self-closed child is not allowed", XML_ERROR_PARSING_DECLARAT… in main()
2158 …XMLTest("Test that declaration after a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.E… in main()
2160 …XMLTest("Test that declaration inside a child is not allowed", XML_ERROR_PARSING_DECLARATION, doc.… in main()
2171 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2173 XMLTest( "Parse to test XMLDocument::Value()", false, doc->Error()); in main()
2174 XMLTest( "XMLDocument::Value() returns null?", NULL, doc->Value() ); in main()
2183 XMLTest( "ErrorName() not null after ClearError()", true, name != 0 ); in main()
2190 XMLTest( "ErrorName() not empty after ClearError()", true, strlen(name) > 0 ); in main()
2202 XMLTest(html, html, printer.CStr()); in main()
2246 XMLTest("Stack overflow prevented.", XML_ELEMENT_DEPTH_EXCEEDED, doc.ErrorID()); in main()
2258 XMLTest("Fuzz attack prevented.", true, true); in main()
2281 XMLTest("Crash bug parsing", XML_SUCCESS, err ); in main()
2284 XMLTest("Crash bug parsing", true, playlist != 0); in main()
2289 XMLTest("Crash bug parsing", true, entry != 0); in main()
2296 XMLTest("Crash bug parsing", true, entry == 0); in main()
2301 XMLTest("Crash bug parsing", true, blank != 0); in main()
2307 XMLTest("Crash bug parsing", true, blank == 0); in main()
2312 XMLTest("Crash bug parsing - Accept()", true, acceptResult); in main()
2321 XMLTest("Crash bug parsing", 2, nProperty); in main()
2335 XMLTest(testString, parseError, doc.ErrorID()); in main()
2336 XMLTest(testString, true, doc.Error()); in main()
2337 XMLTest(testString, expected_error, parseError); in main()
2338 XMLTest(testString, expectedLine, doc.ErrorLineNum()); in main()
2345 XMLTest(testString, false, doc.Error()); in main()
2353 XMLTest(testString, false, doc.Error()); in main()
2404 XMLTest(testString, true, acceptResult); in main()
2406 XMLTest(testString, expectedLines, str.Mem()); in main()
2461 XMLTest("Test mismatched elements.", true, doc.Error()); in main()
2462 XMLTest("Test mismatched elements.", XML_ERROR_MISMATCHED_ELEMENT, doc.ErrorID()); in main()
2477 XMLTest("Open dream.xml", true, perfFP != 0); in main()
2485 XMLTest("Read dream.xml", true, uint32_t(size) >= uint32_t(bytesRead)); in main()
2506 XMLTest( "Parse dream.xml", false, parseDreamXmlFailed ); in main()
2535 XMLTest( "No leaks before exit?", FALSE, leaksBeforeExit ); in main()