From c026597234aa371a106409271885f0cdb3c7bae3 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Tue, 20 Oct 2009 20:25:35 +0000 Subject: tests: Added more tests git-svn-id: http://pugixml.googlecode.com/svn/trunk@162 99668b35-9821-0410-8761-19e4c4f06640 --- tests/test_document.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/test_document.cpp') diff --git a/tests/test_document.cpp b/tests/test_document.cpp index e839b2f..2b7d950 100644 --- a/tests/test_document.cpp +++ b/tests/test_document.cpp @@ -129,3 +129,33 @@ TEST(document_parse_transfer_ownership) CHECK(doc.parse(transfer_ownership_tag(), text)); CHECK_NODE(doc, ""); } + +TEST(document_parse_result_bool) +{ + xml_parse_result result; + + result.status = status_ok; + CHECK(result); + CHECK(!!result); + CHECK(result == true); + + for (int i = 1; i < 20; ++i) + { + result.status = (xml_parse_status)i; + CHECK(!result); + CHECK(result == false); + } +} + +TEST(document_parse_result_description) +{ + xml_parse_result result; + + for (int i = 0; i < 20; ++i) + { + result.status = (xml_parse_status)i; + + CHECK(result.description() != 0); + CHECK(result.description()[0] != 0); + } +} -- cgit v1.2.3