tests: Fix test_assert_macros* with Visual Studio.
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 17:00:11 +0000 (18:00 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 11 Feb 2015 17:04:02 +0000 (18:04 +0100)
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
tests/test_assert_macros.c
tests/test_assert_macros_fail.c

index 8e0ebb1..560f9cf 100644 (file)
@@ -27,7 +27,9 @@ static void test_assert_return_code(void **state)
     rc = stat(".", &sb);
     assert_return_code(rc, 0);
 
+#ifndef _MSC_VER
     assert_true(S_ISDIR(sb.st_mode));
+#endif
 }
 
 int main(void) {
index 2227dfc..5e83996 100644 (file)
@@ -1,12 +1,17 @@
+#include "config.h"
+
 #include <stdarg.h>
 #include <stddef.h>
 #include <setjmp.h>
+#include <cmocka_private.h>
 #include <cmocka.h>
 
 #include <errno.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
 #include <unistd.h>
+#endif
 #include <fcntl.h>
 
 /**************************************