[folks] For symmetry, nullify sets in tear_down() if created in set_up()
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] For symmetry, nullify sets in tear_down() if created in set_up()
- Date: Mon, 18 Mar 2013 19:22:15 +0000 (UTC)
commit 452035512b3b7a78779a9e85ea9b215e7557930b
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Mon Mar 18 12:36:18 2013 +0000
For symmetry, nullify sets in tear_down() if created in set_up()
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 | 8 +++++++-
tests/telepathy/individual-properties.vala | 9 ++++++++-
tests/telepathy/persona-store-capabilities.vala | 9 ++++++++-
3 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/tests/eds/persona-store-tests.vala b/tests/eds/persona-store-tests.vala
index b6a7a12..855f27b 100644
--- a/tests/eds/persona-store-tests.vala
+++ b/tests/eds/persona-store-tests.vala
@@ -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?> ();
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index b8fb345..c0347bb 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -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);
diff --git a/tests/telepathy/persona-store-capabilities.vala b/tests/telepathy/persona-store-capabilities.vala
index 31423da..bb3974d 100644
--- a/tests/telepathy/persona-store-capabilities.vala
+++ b/tests/telepathy/persona-store-capabilities.vala
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]