[libgee] Fix invalid test commit
- From: Didier 'Ptitjes' Villevalois <dvillevalois src gnome org>
- To: svn-commits-list gnome org
- Subject: [libgee] Fix invalid test commit
- Date: Mon, 27 Jul 2009 21:46:32 +0000 (UTC)
commit 448cc8447c2446b5ba858f6e0ff8897ed30fdb15
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Mon Jul 27 23:46:34 2009 +0200
Fix invalid test commit
tests/testcollection.vala | 48 +++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
---
diff --git a/tests/testcollection.vala b/tests/testcollection.vala
new file mode 100644
index 0000000..4b18ebb
--- /dev/null
+++ b/tests/testcollection.vala
@@ -0,0 +1,48 @@
+/* testcollection.vala
+ *
+ * Copyright (C) 2008 Jürg Billeter
+ * Copyright (C) 2009 Didier Villevalois
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author:
+ * Didier 'Ptitjes' Villevalois <ptitjes free fr>
+ */
+
+using GLib;
+using Gee;
+
+public abstract class CollectionTests : TestFixture {
+
+ public CollectionTests (string name) {
+ base(name);
+ add_test ("Collection.to_array ", test_to_array);
+ }
+
+ protected Collection<int> int_collection;
+ protected Collection<string> string_collection;
+ protected Collection<Object> object_collection;
+
+ public void test_to_array() {
+ string_collection.add ("42");
+ string_collection.add ("43");
+ string_collection.add ("44");
+
+ string[] array = (string[]) string_collection.to_array ();
+ assert (array[0] == "42");
+ assert (array[1] == "43");
+ assert (array[2] == "44");
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]