[libgee] Remove invalid to_array implementation and re-enable test



commit 2e54ba64dbf0a97836f559603968538cef8c8825
Author: Didier 'Ptitjes <ptitjes free fr>
Date:   Wed Aug 5 01:20:23 2009 +0200

    Remove invalid to_array implementation and re-enable test

 gee/arraylist.vala        |    6 ------
 tests/testcollection.vala |    2 +-
 2 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gee/arraylist.vala b/gee/arraylist.vala
index 9d8f10b..23c885a 100644
--- a/gee/arraylist.vala
+++ b/gee/arraylist.vala
@@ -175,12 +175,6 @@ public class Gee.ArrayList<G> : AbstractList<G> {
 		return changed;
 	}
 
-	public override G[] to_array() {
-		G[] array = new G[_size];
-		Memory.copy(array, _items, sizeof(G) * _size);
-		return array;
-	}
-
 	private void shift (int start, int delta) {
 		assert (start >= 0);
 		assert (start <= _size);
diff --git a/tests/testcollection.vala b/tests/testcollection.vala
index bbaed2a..4c31cd8 100644
--- a/tests/testcollection.vala
+++ b/tests/testcollection.vala
@@ -28,7 +28,7 @@ public abstract class CollectionTests : TestFixture {
 
 	public CollectionTests (string name) {
 		base(name);
-		//add_test ("Collection.to_array ", test_to_array);
+		add_test ("Collection.to_array", test_to_array);
 	}
 
 	protected Collection<int> int_collection;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]