cmocka seems to #define fail to something inappropriate.
#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) {
#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;
*/
#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) {
* 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;
* 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;
* 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;
* 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"
#include <string.h>
#endif
+#include "torture.h"
static void check_iconv_to_native_normalization(void **state)
{
#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;
*/
#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;
#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"
#include <errno.h>
#include <stdio.h>
-#include "torture.h"
-
#include "csync_private.h"
#include "std/c_utf8.h"
#include "vio/csync_vio.h"
#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];