[gxml] Added deserialize unit tests for SerializableBool
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added deserialize unit tests for SerializableBool
- Date: Thu, 22 Oct 2015 00:43:57 +0000 (UTC)
commit 22f34d6ada52a38aa4aa594f47feeaa5abef89a3
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Oct 21 19:28:36 2015 -0500
Added deserialize unit tests for SerializableBool
test/SerializablePropertyBoolTest.vala | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/test/SerializablePropertyBoolTest.vala b/test/SerializablePropertyBoolTest.vala
index 6c6bc37..53158e5 100644
--- a/test/SerializablePropertyBoolTest.vala
+++ b/test/SerializablePropertyBoolTest.vala
@@ -100,5 +100,19 @@ class SerializablePropertyBoolTest : GXmlTest {
assert_not_reached ();
}
});
+ Test.add_func ("/gxml/serializable/Bool/deserialize",
+ () => {
+ try {
+ var doc1 = new xDocument.from_string ("""<?xml version="1.0"?>
+ <BooleanNode boolean="true"/>""");
+ var b = new BoolNode ();
+ b.deserialize (doc1);
+ assert (b.boolean.get_serializable_property_value () == "true");
+ assert (b.boolean.get_value () == true);
+ } catch (GLib.Error e) {
+ Test.message (@"ERROR: $(e.message)");
+ assert_not_reached ();
+ }
+ });
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]