diff --git a/Testing/Temporary/CTestCostData.txt b/Testing/Temporary/CTestCostData.txt new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/Testing/Temporary/CTestCostData.txt @@ -0,0 +1 @@ +--- diff --git a/Testing/Temporary/LastTest.log b/Testing/Temporary/LastTest.log new file mode 100644 index 0000000..7a4e83d --- /dev/null +++ b/Testing/Temporary/LastTest.log @@ -0,0 +1,3 @@ +Start testing: Sep 05 15:55 CST +---------------------------------------------------------- +End testing: Sep 05 15:55 CST diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 92a0883..c894429 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -13,4 +13,3 @@ add_custom_test(parser_test) add_custom_test(printable_test) add_custom_test(document_test) add_custom_test(buffer_test) -add_custom_test(doc_test) diff --git a/tests/data/example.xml b/tests/data/example1.xml similarity index 100% rename from tests/data/example.xml rename to tests/data/example1.xml diff --git a/tests/doc_test.cpp b/tests/doc_test.cpp deleted file mode 100644 index f9ace25..0000000 --- a/tests/doc_test.cpp +++ /dev/null @@ -1,23 +0,0 @@ -// All example codes in document -#include -#include -#include "myxml/document.hpp" -#include "myxml/element.hpp" - -TEST_CASE("docs/examples", "[doc]") -{ - SECTION("1") - { - using namespace myxml; - std::string xml = ""; - document doc = document::parse(xml); - std::string path = "tests/data/example.xml"; - doc = document::load(path); - // get root elem - std::optional elem = doc.root().first_elem(); - // or directly query elem in root - elem = doc.first_elem(); - // or query by name - elem = doc.first_elem("elem"); - } -} \ No newline at end of file diff --git a/tests/parser_test.cpp b/tests/parser_test.cpp index 320ae73..c4b210c 100644 --- a/tests/parser_test.cpp +++ b/tests/parser_test.cpp @@ -218,6 +218,7 @@ TEST_CASE("Parsing simple xml elements", "[parser]") SECTION("Simple File Buffer") { - auto doc = document::load("tests/data/example.xml"); + auto doc = document::load("tests/data/example1.xml"); + auto root = doc.root(); } } \ No newline at end of file diff --git a/tests/printable_test.cpp b/tests/printable_test.cpp index b24ab5c..d4ada4a 100644 --- a/tests/printable_test.cpp +++ b/tests/printable_test.cpp @@ -2,21 +2,6 @@ #include #include "myxml/element.hpp" -// TEST_CASE("Formatted Export", "[exportable]") -// { -// SECTION("Single") -// { -// auto root = myxml::element_impl::_new("root"); -// REQUIRE(root->str() == "\n"); -// } - -// SECTION("Text") -// { -// auto root = myxml::element_impl::parse("Hello, world!"); -// REQUIRE(root->str() == "\n Hello, world!\n\n"); -// } -// } - TEST_CASE("Raw Export", "[exportable]") { auto root = myxml::element_impl::parse("");