[libgee] Fix read-only view unique instance test
- From: Didier 'Ptitjes' Villevalois <dvillevalois src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libgee] Fix read-only view unique instance test
- Date: Mon, 14 Sep 2009 21:06:11 +0000 (UTC)
commit 01388b3abfff3f4ac513896004c78555a303194b
Author: Didier 'Ptitjes <ptitjes free fr>
Date: Mon Sep 14 23:06:14 2009 +0200
Fix read-only view unique instance test
tests/testreadonlycollection.vala | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/tests/testreadonlycollection.vala b/tests/testreadonlycollection.vala
index f18ee31..6340abc 100644
--- a/tests/testreadonlycollection.vala
+++ b/tests/testreadonlycollection.vala
@@ -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 () {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]