[folks] Make EdsTest.TestCase.eds_backend nullable
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Make EdsTest.TestCase.eds_backend nullable
- Date: Mon, 18 Mar 2013 19:21:49 +0000 (UTC)
commit 039a7ccaae6a5824edab276535f46bc1ed0f4bd1
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Thu Mar 14 14:53:13 2013 +0000
Make EdsTest.TestCase.eds_backend nullable
It's null outside the period from set_up() to tear_down().
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/lib/eds/test-case.vala | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests/lib/eds/test-case.vala b/tests/lib/eds/test-case.vala
index ded678a..cecc16e 100644
--- a/tests/lib/eds/test-case.vala
+++ b/tests/lib/eds/test-case.vala
@@ -24,7 +24,7 @@
public class EdsTest.TestCase : Folks.TestCase
{
- public EdsTest.Backend eds_backend;
+ public EdsTest.Backend? eds_backend = null;
public TestCase (string name)
{
@@ -41,13 +41,14 @@ public class EdsTest.TestCase : Folks.TestCase
public virtual void create_backend ()
{
this.eds_backend = new EdsTest.Backend ();
- this.eds_backend.set_up ();
+ ((!) this.eds_backend).set_up ();
}
public virtual void configure_primary_store ()
{
/* By default, configure EDS as the primary store. */
- var config_val = "eds:%s".printf (this.eds_backend.address_book_uid);
+ assert (this.eds_backend != null);
+ string config_val = "eds:" + ((!) this.eds_backend).address_book_uid;
Environment.set_variable ("FOLKS_PRIMARY_STORE", config_val, true);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]