For symmetry, nullify sets in tear_down() if created in set_up()
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 18 Mar 2013 12:36:18 +0000 (12:36 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 18 Mar 2013 19:11:01 +0000 (19:11 +0000)
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=695381
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
tests/eds/persona-store-tests.vala
tests/telepathy/individual-properties.vala
tests/telepathy/persona-store-capabilities.vala

index b6a7a12..855f27b 100644 (file)
@@ -24,7 +24,7 @@ using Gee;
 
 public class PersonaStoreTests : EdsTest.TestCase
 {
-  private HashSet<string> _capabilities_received;
+  private HashSet<string>? _capabilities_received = null;
 
   public PersonaStoreTests ()
     {
@@ -38,6 +38,12 @@ public class PersonaStoreTests : EdsTest.TestCase
       this._capabilities_received = new HashSet<string> ();
     }
 
+  public override void tear_down ()
+    {
+      this._capabilities_received = null;
+      base.tear_down ();
+    }
+
   public void test_persona_store ()
     {
       Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
index b8fb345..c0347bb 100644 (file)
@@ -27,7 +27,7 @@ using Gee;
 public class IndividualPropertiesTests : TpfTest.TestCase
 {
   private int _test_timeout = 3;
-  private HashSet<string> _changes_pending;
+  private HashSet<string>? _changes_pending = null;
 
   public IndividualPropertiesTests ()
     {
@@ -53,6 +53,13 @@ public class IndividualPropertiesTests : TpfTest.TestCase
       this._changes_pending = new HashSet<string> ();
     }
 
+  public override void tear_down ()
+    {
+      this._changes_pending = null;
+
+      base.tear_down ();
+    }
+
   public void test_individual_properties ()
     {
       var main_loop = new GLib.MainLoop (null, false);
index 31423da..bb3974d 100644 (file)
@@ -26,7 +26,7 @@ using Gee;
 
 public class PersonaStoreCapabilitiesTests : TpfTest.TestCase
 {
-  private HashSet<string> _capabilities_received;
+  private HashSet<string>? _capabilities_received = null;
   private int _test_timeout = 3;
 
   public PersonaStoreCapabilitiesTests ()
@@ -47,6 +47,13 @@ public class PersonaStoreCapabilitiesTests : TpfTest.TestCase
       this._capabilities_received = new HashSet<string> ();
     }
 
+  public override void tear_down ()
+    {
+      this._capabilities_received = null;
+
+      base.tear_down ();
+    }
+
   public void test_persona_store_capabilities ()
     {
       var main_loop = new GLib.MainLoop (null, false);