Fix compile errors
authorChristian Kamm <mail@ckamm.de>
Thu, 7 Sep 2017 09:02:05 +0000 (11:02 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:04 +0000 (22:01 +0200)
cmocka seems to #define fail to something inappropriate.

test/csync/csync_tests/check_csync_exclude.cpp
test/csync/csync_tests/check_csync_log.cpp
test/csync/csync_tests/check_csync_statedb_load.cpp
test/csync/csync_tests/check_csync_statedb_query.cpp
test/csync/csync_tests/check_csync_update.cpp
test/csync/csync_tests/check_csync_util.cpp
test/csync/encoding_tests/check_encoding.cpp
test/csync/std_tests/check_std_c_path.c
test/csync/std_tests/check_std_c_time.c
test/csync/vio_tests/check_vio.cpp
test/csync/vio_tests/check_vio_ext.cpp

index 91982118c1d8a8af0571dc98767f7b5bff7d0909..99a771266290f820b6c0ab249f24c2d7f4045d0f 100644 (file)
 #include <time.h>
 #include <sys/time.h>
 
-#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) {
index 7953da73064a3c39ba0aa5ca7e979bcb34c3c31a..9c767b7c2e5d2008bde5d27e8b320b83aa17df51 100644 (file)
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#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;
 
index e496b8222313e94235f948a2f1bd44133ee4c2f1..f5761f9ffe5fb4ec1923d8ab063ee725ab9290fa 100644 (file)
  */
 #include <string.h>
 
-#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) {
index 17c2a73e8ba2e781c4fa2ae389f35015cf2b9354..d507c7108e09c19cbfcd6fb2803d5258b023de63 100644 (file)
  * 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;
index 70624ec11df59b7667be6bdd9d05923e0942c592..184f6877e44a9d6e55ffd0d1761b1b36752f2b1a 100644 (file)
  * 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;
index 0df63774182c2cdbc9c33590d5ade83b2fd098bb..eb1e613eaf6fbae07037216b72f1c66ad85cccd5 100644 (file)
  * 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;
index 6252dde4db17825210457b687c3618f9c326fda3..2f327a3b0683df635550a5a7499c20ae9277c7f9 100644 (file)
@@ -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 <stdio.h>
 #include "c_string.h"
 #include "c_path.h"
@@ -27,6 +26,7 @@
 #include <string.h>
 #endif
 
+#include "torture.h"
 
 static void check_iconv_to_native_normalization(void **state)
 {
index 25a250aab556a3863bcabe5d45d162972e1360ff..2513d3fa29d6fedaf705d4a76fb168b4ad0e22c2 100644 (file)
 #include <stdio.h>
 #include <time.h>
 
-#include "torture.h"
-
 #include "std/c_path.h"
 
+#include "torture.h"
+
 static void check_c_basename(void **state)
 {
     char *bname;
index 52c5fd8083a4681fa52a9f8375db3f7cd80952be..db8e72ff67c15b2c2acb0ee9ac98a92cc9dcdeae 100644 (file)
  */
 #include <string.h>
 
-#include "torture.h"
-
 #include "csync_time.h"
 #include "std/c_time.h"
 #include <unistd.h>
 
+#include "torture.h"
+
 static void check_c_tspecdiff(void **state)
 {
     struct timespec start, finish, diff;
index 006e3bc5c35f3c2bb95dc9ee5b788016fd3f1864..31da1113bebd0a04379cfe4471e4d354d56f2a69 100644 (file)
 #include <string.h>
 #include <errno.h>
 
-#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"
index 10de6eb7d0e30d05f4f5e6eb8e12dc6e1f2a08cd..625285ce08225e43ab7777dff3025fa810479f9a 100644 (file)
@@ -24,8 +24,6 @@
 #include <errno.h>
 #include <stdio.h>
 
-#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];