[gxml/gxml-0.8] Added xDocument.from_string() tests



commit 296d80ca7c1fe0977976cf5481fe14aea6ec0727
Author: Daniel Espinosa <esodan gmail com>
Date:   Tue Jan 12 10:23:50 2016 -0600

    Added xDocument.from_string() tests

 test/DocumentTest.vala |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/test/DocumentTest.vala b/test/DocumentTest.vala
index 4829fe1..5d1d07b 100644
--- a/test/DocumentTest.vala
+++ b/test/DocumentTest.vala
@@ -151,6 +151,19 @@ class DocumentTest : GXmlTest {
                                xml = """<?xml version="1.0"?>""";
                                doc = new xDocument.from_string (xml);
 
+                               assert (doc != null);
+                               root = doc.document_element;
+                               assert (root == null);
+                       });
+               Test.add_func ("/gxml/document/construct_from_string_invalid", () => {
+                               string xml;
+                               xDocument doc;
+                               GXml.xNode root;
+
+                               xml = "";
+                               doc = new xDocument.from_string (xml);
+
+                               assert (doc != null);
                                root = doc.document_element;
                                assert (root == null);
                        });


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]