[gxml] Added test to add and remove namespaced attributes
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added test to add and remove namespaced attributes
- Date: Thu, 3 Nov 2016 00:02:52 +0000 (UTC)
commit d9228d9818065cde4405479f54de1296655f1139
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Nov 2 17:51:27 2016 -0600
Added test to add and remove namespaced attributes
test/GomElementTest.vala | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/test/GomElementTest.vala b/test/GomElementTest.vala
index da35012..bf49b43 100644
--- a/test/GomElementTest.vala
+++ b/test/GomElementTest.vala
@@ -121,6 +121,16 @@ class GomElementTest : GXmlTest {
assert (elem.attributes.size == 2);
elem.remove_attribute ("owl");
assert (elem.attributes.size == 1);
+
+ elem.set_attribute_ns ("http://www.w3.org/2000/xmlns/", "xmlns:gxml",
+
"http://www.gnome.org/GXml");
+ assert (elem.attributes.size == 2);
+ elem.set_attribute_ns ("http://www.gnome.org/GXml", "gxml:xola","Mexico");
+ assert (elem.attributes.size == 3);
+ assert (elem.get_attribute_ns ("http://www.gnome.org/GXml", "xola") ==
"Mexico");
+ elem.remove_attribute_ns ("http://www.gnome.org/GXml", "xola");
+ assert (elem.get_attribute_ns ("http://www.gnome.org/GXml", "xola") == null);
+ assert (elem.attributes.size == 2);
} catch (GLib.Error e) {
Test.message (e.message);
assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]