Fix read-only view unique instance test
authorDidier 'Ptitjes <ptitjes@free.fr>
Mon, 14 Sep 2009 21:06:14 +0000 (23:06 +0200)
committerDidier 'Ptitjes <ptitjes@free.fr>
Mon, 14 Sep 2009 21:06:14 +0000 (23:06 +0200)
tests/testreadonlycollection.vala

index f18ee31..6340abc 100644 (file)
@@ -44,15 +44,14 @@ public abstract class ReadOnlyCollectionTests : Gee.TestCase {
                var another_ro_collection = test_collection.read_only_view;
                assert (ro_collection == another_ro_collection);
 
-               weak Collection<string> saved_instance = ro_collection;
-               long instance_address = (long) saved_instance;
-               assert (instance_address == (long) another_ro_collection);
+               ro_collection.set_data ("marker", new Object ());
+               assert (another_ro_collection.get_data ("marker") != null);
 
                another_ro_collection = null;
                ro_collection = null;
 
                another_ro_collection = test_collection.read_only_view;
-               assert (instance_address != (long) another_ro_collection);
+               assert (another_ro_collection.get_data ("marker") == null);
        }
 
        public void test_add () {