From 8a094d2b0ef489abd08c569d41cac609b2a9751a Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 7 Sep 2017 11:02:05 +0200 Subject: [PATCH] Fix compile errors cmocka seems to #define fail to something inappropriate. --- test/csync/csync_tests/check_csync_exclude.cpp | 4 ++-- test/csync/csync_tests/check_csync_log.cpp | 4 ++-- test/csync/csync_tests/check_csync_statedb_load.cpp | 4 ++-- test/csync/csync_tests/check_csync_statedb_query.cpp | 4 ++-- test/csync/csync_tests/check_csync_update.cpp | 4 ++-- test/csync/csync_tests/check_csync_util.cpp | 4 ++-- test/csync/encoding_tests/check_encoding.cpp | 2 +- test/csync/std_tests/check_std_c_path.c | 4 ++-- test/csync/std_tests/check_std_c_time.c | 4 ++-- test/csync/vio_tests/check_vio.cpp | 4 ++-- test/csync/vio_tests/check_vio_ext.cpp | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/test/csync/csync_tests/check_csync_exclude.cpp b/test/csync/csync_tests/check_csync_exclude.cpp index 91982118c..99a771266 100644 --- a/test/csync/csync_tests/check_csync_exclude.cpp +++ b/test/csync/csync_tests/check_csync_exclude.cpp @@ -22,11 +22,11 @@ #include #include -#include "torture.h" - #define CSYNC_TEST 1 #include "csync_exclude.cpp" +#include "torture.h" + #define EXCLUDE_LIST_FILE SOURCEDIR"/../../sync-exclude.lst" static int setup(void **state) { diff --git a/test/csync/csync_tests/check_csync_log.cpp b/test/csync/csync_tests/check_csync_log.cpp index 7953da730..9c767b7c2 100644 --- a/test/csync/csync_tests/check_csync_log.cpp +++ b/test/csync/csync_tests/check_csync_log.cpp @@ -20,13 +20,13 @@ #include #include -#include "torture.h" - #include "csync.h" #include "csync_log.cpp" #include "c_private.h" #include "std/c_utf8.h" +#include "torture.h" + static int setup(void **state) { int rc; diff --git a/test/csync/csync_tests/check_csync_statedb_load.cpp b/test/csync/csync_tests/check_csync_statedb_load.cpp index e496b8222..f5761f9ff 100644 --- a/test/csync/csync_tests/check_csync_statedb_load.cpp +++ b/test/csync/csync_tests/check_csync_statedb_load.cpp @@ -19,11 +19,11 @@ */ #include -#include "torture.h" - #define CSYNC_TEST 1 #include "csync_statedb.cpp" +#include "torture.h" + #define TESTDB "/tmp/check_csync1/test.db" static int setup(void **state) { diff --git a/test/csync/csync_tests/check_csync_statedb_query.cpp b/test/csync/csync_tests/check_csync_statedb_query.cpp index 17c2a73e8..d507c7108 100644 --- a/test/csync/csync_tests/check_csync_statedb_query.cpp +++ b/test/csync/csync_tests/check_csync_statedb_query.cpp @@ -17,16 +17,16 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "torture.h" #define CSYNC_TEST 1 #include "csync_statedb.cpp" +#include "torture.h" + #define TESTDB "/tmp/check_csync1/test.db" #define TESTDBTMP "/tmp/check_csync1/test.db.ctmp" - static int setup(void **state) { CSYNC *csync; diff --git a/test/csync/csync_tests/check_csync_update.cpp b/test/csync/csync_tests/check_csync_update.cpp index 70624ec11..184f6877e 100644 --- a/test/csync/csync_tests/check_csync_update.cpp +++ b/test/csync/csync_tests/check_csync_update.cpp @@ -17,10 +17,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "torture.h" - #include "csync_update.cpp" +#include "torture.h" + #define TESTDB "/tmp/check_csync/journal.db" static int firstrun = 1; diff --git a/test/csync/csync_tests/check_csync_util.cpp b/test/csync/csync_tests/check_csync_util.cpp index 0df637741..eb1e613ea 100644 --- a/test/csync/csync_tests/check_csync_util.cpp +++ b/test/csync/csync_tests/check_csync_util.cpp @@ -17,10 +17,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "torture.h" - #include "csync_util.h" +#include "torture.h" + static void check_csync_instruction_str(void **state) { const char *str; diff --git a/test/csync/encoding_tests/check_encoding.cpp b/test/csync/encoding_tests/check_encoding.cpp index 6252dde4d..2f327a3b0 100644 --- a/test/csync/encoding_tests/check_encoding.cpp +++ b/test/csync/encoding_tests/check_encoding.cpp @@ -17,7 +17,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "torture.h" #include #include "c_string.h" #include "c_path.h" @@ -27,6 +26,7 @@ #include #endif +#include "torture.h" static void check_iconv_to_native_normalization(void **state) { diff --git a/test/csync/std_tests/check_std_c_path.c b/test/csync/std_tests/check_std_c_path.c index 25a250aab..2513d3fa2 100644 --- a/test/csync/std_tests/check_std_c_path.c +++ b/test/csync/std_tests/check_std_c_path.c @@ -22,10 +22,10 @@ #include #include -#include "torture.h" - #include "std/c_path.h" +#include "torture.h" + static void check_c_basename(void **state) { char *bname; diff --git a/test/csync/std_tests/check_std_c_time.c b/test/csync/std_tests/check_std_c_time.c index 52c5fd808..db8e72ff6 100644 --- a/test/csync/std_tests/check_std_c_time.c +++ b/test/csync/std_tests/check_std_c_time.c @@ -19,12 +19,12 @@ */ #include -#include "torture.h" - #include "csync_time.h" #include "std/c_time.h" #include +#include "torture.h" + static void check_c_tspecdiff(void **state) { struct timespec start, finish, diff; diff --git a/test/csync/vio_tests/check_vio.cpp b/test/csync/vio_tests/check_vio.cpp index 006e3bc5c..31da1113b 100644 --- a/test/csync/vio_tests/check_vio.cpp +++ b/test/csync/vio_tests/check_vio.cpp @@ -23,12 +23,12 @@ #include #include -#include "torture.h" - #include "csync_private.h" #include "std/c_utf8.h" #include "vio/csync_vio.h" +#include "torture.h" + #define CSYNC_TEST_DIR "/tmp/csync_test/" #define CSYNC_TEST_DIRS "/tmp/csync_test/this/is/a/mkdirs/test" #define CSYNC_TEST_FILE "/tmp/csync_test/file.txt" diff --git a/test/csync/vio_tests/check_vio_ext.cpp b/test/csync/vio_tests/check_vio_ext.cpp index 10de6eb7d..625285ce0 100644 --- a/test/csync/vio_tests/check_vio_ext.cpp +++ b/test/csync/vio_tests/check_vio_ext.cpp @@ -24,8 +24,6 @@ #include #include -#include "torture.h" - #include "csync_private.h" #include "std/c_utf8.h" #include "vio/csync_vio.h" @@ -39,6 +37,8 @@ #endif #define MKDIR_MASK (S_IRWXU |S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) +#include "torture.h" + #define WD_BUFFER_SIZE 255 static mbchar_t wd_buffer[WD_BUFFER_SIZE]; -- 2.30.2