[gxml] Added unit test for Enumeration.to_string_array()
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Added unit test for Enumeration.to_string_array()
- Date: Tue, 6 Oct 2015 13:46:40 +0000 (UTC)
commit 7c3e7456483d12bbf7b918149787cedf1258f7c6
Author: Daniel Espinosa <esodan gmail com>
Date: Sat Oct 3 23:45:33 2015 -0500
Added unit test for Enumeration.to_string_array()
test/EnumerationTest.vala | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/test/EnumerationTest.vala b/test/EnumerationTest.vala
index f2353b8..585cc07 100644
--- a/test/EnumerationTest.vala
+++ b/test/EnumerationTest.vala
@@ -238,5 +238,17 @@ class SerializableEnumerationTest : GXmlTest
Test.message ("Parse error: "+e.message);
}
});
+ Test.add_func ("/gxml/serializable/enumeration/to_string_array", () => {
+ try {
+ string[] options = Enumeration.to_string_array (typeof (Options.Values));
+ assert (options != null);
+ assert (options.length == 3);
+ assert (options[0] == "Ap");
+ assert (options[1] == "KpValue");
+ assert (options[2] == "ExternalValueVision");
+ } catch (GLib.Error e) {
+ Test.message ("Parse error: "+e.message);
+ }
+ });
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]