[gxml: 4/8] Added xDocument.from_string() tests
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml: 4/8] Added xDocument.from_string() tests
- Date: Wed, 13 Jan 2016 04:27:10 +0000 (UTC)
commit 4b92662ccccc2023ae298de094c28379048e7ae4
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]