60 lines
2 KiB
Diff
60 lines
2 KiB
Diff
From 42f0f6b0f17a584b703981b8a392c3225c7a8e98 Mon Sep 17 00:00:00 2001
|
|
From: Seif Lotfy <seif@lotfy.com>
|
|
Date: Thu, 2 Jan 2014 08:09:01 +0100
|
|
Subject: [PATCH 01/12] Fix unit-tests
|
|
|
|
Currently the unit tests failed when loading the xdg directories
|
|
and also it seems like optimizing the event variant lead to a
|
|
segfault when converting back via from_variant with several events
|
|
---
|
|
libzeitgeist/event.vala | 4 ++--
|
|
test/c/test-datasource.c | 3 +--
|
|
test/c/test-event.c | 3 +--
|
|
3 files changed, 4 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/libzeitgeist/event.vala b/libzeitgeist/event.vala
|
|
index 67fe47f..0cd708c 100644
|
|
--- a/libzeitgeist/event.vala
|
|
+++ b/libzeitgeist/event.vala
|
|
@@ -292,8 +292,8 @@ public class Event : Object
|
|
}
|
|
|
|
Variant event_variant = vb.end ().get_normal_form ();
|
|
- Variant ret = optimize_variant_allocation (event_variant);
|
|
- return ret;
|
|
+ //Variant ret = optimize_variant_allocation (event_variant);
|
|
+ return event_variant;
|
|
}
|
|
|
|
private Variant optimize_variant_allocation (Variant event_variant) {
|
|
diff --git a/test/c/test-datasource.c b/test/c/test-datasource.c
|
|
index a60d48b..067da55 100644
|
|
--- a/test/c/test-datasource.c
|
|
+++ b/test/c/test-datasource.c
|
|
@@ -35,8 +35,7 @@ static const gchar *old_xdg_data_dirs = NULL;
|
|
static void
|
|
setup (Fixture *fix, gconstpointer data)
|
|
{
|
|
- if (old_xdg_data_dirs != NULL)
|
|
- old_xdg_data_dirs = g_getenv ("XDG_DATA_DIRS");
|
|
+ old_xdg_data_dirs = g_getenv ("XDG_DATA_DIRS");
|
|
g_setenv ("XDG_DATA_DIRS", TEST_DIR, TRUE);
|
|
}
|
|
|
|
diff --git a/test/c/test-event.c b/test/c/test-event.c
|
|
index 746de3d..440d3c3 100644
|
|
--- a/test/c/test-event.c
|
|
+++ b/test/c/test-event.c
|
|
@@ -35,8 +35,7 @@ static const gchar *old_xdg_data_dirs = NULL;
|
|
static void
|
|
setup (Fixture *fix, gconstpointer data)
|
|
{
|
|
- if (old_xdg_data_dirs != NULL)
|
|
- old_xdg_data_dirs = g_getenv ("XDG_DATA_DIRS");
|
|
+ old_xdg_data_dirs = g_getenv ("XDG_DATA_DIRS");
|
|
g_setenv ("XDG_DATA_DIRS", TEST_DIR, TRUE);
|
|
}
|
|
|
|
--
|
|
2.0.4
|
|
|