summaryrefslogtreecommitdiff
path: root/tests/test_document.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 20:25:35 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 20:25:35 +0000
commitc026597234aa371a106409271885f0cdb3c7bae3 (patch)
tree3b5e6dc79a7b1faeb57bfd4a91bb34b529dc00c6 /tests/test_document.cpp
parenta2249c1304564c96ddd1c052043f8d5ef53e2112 (diff)
tests: Added more tests
git-svn-id: http://pugixml.googlecode.com/svn/trunk@162 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_document.cpp')
-rw-r--r--tests/test_document.cpp30
1 files changed, 30 insertions, 0 deletions
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, "<node />");
}
+
+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);
+ }
+}