[Pkg-owncloud-commits] [owncloud-client] 11/69: tests: Fix CSync Journal test, use real CSYNC struct from csync_private.

Sandro Knauß hefee-guest at moszumanska.debian.org
Fri Nov 7 19:41:06 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit b6915216628ca39e8bb20c0a94fd35a3090fba92
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Oct 27 13:14:41 2014 +0100

    tests: Fix CSync Journal test, use real CSYNC struct from csync_private.
    
    This fixes bug #2396
---
 test/testcsyncsqlite.h | 32 +++-----------------------------
 1 file changed, 3 insertions(+), 29 deletions(-)

diff --git a/test/testcsyncsqlite.h b/test/testcsyncsqlite.h
index 0765668..01b886b 100644
--- a/test/testcsyncsqlite.h
+++ b/test/testcsyncsqlite.h
@@ -8,6 +8,7 @@
 #define MIRALL_TESTCSYNCSQLITE_H
 
 #include "csync_statedb.h"
+#include "csync_private.h"
 #include <QtTest>
 
 
@@ -16,39 +17,12 @@ class TestCSyncSqlite : public QObject
     Q_OBJECT
 
 private:
-    /* Attention !!!!!!!!!!!!!!!!!!!
-     * This struct MY_CSYNC has to be a copy of the CSYNC struct defined
-     * in csync_private.h until the end of struct statedb.
-     * Subsequent functions cast the struct to CSYNC. In order to get the
-     * same values as in the original struct, the start must be the same.
-     */
-    typedef struct {
-        struct {
-            csync_auth_callback auth_function;
-            void *userdata;
-            csync_update_callback update_callback;
-            void *update_callback_userdata;
-        } callbacks;
-        c_strlist_t *excludes;
-
-        struct {
-            char *file;
-            sqlite3 *db;
-            int exists;
-            int disabled;
-
-            sqlite3_stmt* by_hash_stmt;
-            sqlite3_stmt* by_fileid_stmt;
-            sqlite3_stmt* by_inode_stmt;
-        } statedb;
-    } MY_CSYNC;
-
-    MY_CSYNC _ctx;
+    CSYNC _ctx;
 private slots:
     void initTestCase() {
         int rc;
 
-        memset(&_ctx, 0, sizeof(MY_CSYNC));
+        memset(&_ctx, 0, sizeof(CSYNC));
 
         _ctx.statedb.file = c_strdup("./test_journal.db");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list