tracker r2028 - in branches/indexer-split: . tests/trackerd
- From: ifrade svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2028 - in branches/indexer-split: . tests/trackerd
- Date: Thu, 7 Aug 2008 12:07:55 +0000 (UTC)
Author: ifrade
Date: Thu Aug 7 12:07:54 2008
New Revision: 2028
URL: http://svn.gnome.org/viewvc/tracker?rev=2028&view=rev
Log:
Fixed unit tests and linked with new code
Modified:
branches/indexer-split/ChangeLog
branches/indexer-split/tests/trackerd/Makefile.am
branches/indexer-split/tests/trackerd/tracker-index-test.c
Modified: branches/indexer-split/tests/trackerd/Makefile.am
==============================================================================
--- branches/indexer-split/tests/trackerd/Makefile.am (original)
+++ branches/indexer-split/tests/trackerd/Makefile.am Thu Aug 7 12:07:54 2008
@@ -43,18 +43,18 @@
endif
-#TEST_PROGS += tracker-index
+TEST_PROGS += tracker-index
-#tracker_index_SOURCES = \
-# tracker-index-test.c \
-# tracker-db-index.c
+tracker_index_SOURCES = \
+ tracker-index-test.c
-#tracker_index_LDADD = \
-# $(top_builddir)/tests/common/libtracker-testcommon.la \
-# $(GMODULE_LIBS) \
-# $(GTHREAD_LIBS) \
-# $(GLIB2_LIBS) \
-# $(DBUS_LIBS) \
-# $(GIO_LIBS) \
-# $(QDBM_LIBS)
+tracker_index_LDADD = \
+ $(top_builddir)/tests/common/libtracker-testcommon.la \
+ $(top_builddir)/src/libtracker-db/libtracker-db.la \
+ $(GMODULE_LIBS) \
+ $(GTHREAD_LIBS) \
+ $(GLIB2_LIBS) \
+ $(DBUS_LIBS) \
+ $(GIO_LIBS) \
+ $(QDBM_LIBS)
Modified: branches/indexer-split/tests/trackerd/tracker-index-test.c
==============================================================================
--- branches/indexer-split/tests/trackerd/tracker-index-test.c (original)
+++ branches/indexer-split/tests/trackerd/tracker-index-test.c Thu Aug 7 12:07:54 2008
@@ -3,7 +3,8 @@
#include <tracker-test-helpers.h>
#include <gio/gio.h>
-#include "tracker-db-index.h"
+#include <libtracker-db/tracker-db-index.h>
+#include <libtracker-db/tracker-db-index-item.h>
/* From libtracker-common/tracker-config.c */
#define DEFAULT_MAX_BUCKET_COUNT 524288
@@ -20,7 +21,7 @@
DEFAULT_MAX_BUCKET_COUNT,
TRUE);
- g_assert (tracker_db_index_get_reload (index));
+ g_assert (!tracker_db_index_get_reload (index));
suggestion = tracker_db_index_get_suggestion (index, "Thiz", 9);
@@ -35,7 +36,7 @@
test_reloading ()
{
TrackerDBIndex *index;
- TrackerIndexItem *hits;
+ TrackerDBIndexItem *hits = NULL;
guint count;
index = tracker_db_index_new ("./example.index",
@@ -46,12 +47,11 @@
tracker_db_index_set_reload (index, TRUE);
g_assert (tracker_db_index_get_reload (index)); /* Trivial check of get/set */
- if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) {
- hits = tracker_db_index_get_word_hits (index, "this", &count);
- g_free (hits);
- }
+ hits = tracker_db_index_get_word_hits (index, "this", &count);
+ g_assert (hits);
+ g_free (hits);
- g_test_trap_assert_stderr ("*Opening index:'./example.index'*");
+ g_assert (!tracker_db_index_get_reload (index)); /* Trivial check of get/set */
}
static void
@@ -65,7 +65,7 @@
DEFAULT_MAX_BUCKET_COUNT,
TRUE);
- /* Reload true: lazy opening */
+ /* Reload true: the index doesnt exists */
g_assert (tracker_db_index_get_reload (index));
/* Return NULL, the index cannot reload the file */
@@ -88,7 +88,7 @@
DEFAULT_MAX_BUCKET_COUNT,
TRUE);
- /* Reload true: Lazy opening */
+ /* Reload true: the index doesnt exists */
g_assert (tracker_db_index_get_reload (index));
good = g_file_new_for_path ("./example.index");
@@ -123,7 +123,8 @@
test_reloading );
g_test_add_func ("/trackerd/tracker-indexer/bad_index",
test_bad_index );
-
+ g_test_add_func ("/trackerd/tracker-indexer/created_file_in_the_mean_time",
+ test_created_file_in_the_mean_time);
result = g_test_run ();
/* End */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]