summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2015-02-11 17:00:11 (GMT)
committerAndreas Schneider <asn@cryptomilk.org>2015-02-11 17:04:02 (GMT)
commit609d21b6293991743f9218037033412661147156 (patch)
tree814f9dd033eb22ad07713e565b4838626e5efb0e
parent8794c46a0094eea70cc2122ffeebf00e8ed926f4 (diff)
downloadcmocka-609d21b6293991743f9218037033412661147156.zip
cmocka-609d21b6293991743f9218037033412661147156.tar.gz
cmocka-609d21b6293991743f9218037033412661147156.tar.bz2
tests: Fix test_assert_macros* with Visual Studio.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/test_assert_macros.c2
-rw-r--r--tests/test_assert_macros_fail.c5
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_assert_macros.c b/tests/test_assert_macros.c
index 8e0ebb1..560f9cf 100644
--- a/tests/test_assert_macros.c
+++ b/tests/test_assert_macros.c
@@ -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) {
diff --git a/tests/test_assert_macros_fail.c b/tests/test_assert_macros_fail.c
index 2227dfc..5e83996 100644
--- a/tests/test_assert_macros_fail.c
+++ b/tests/test_assert_macros_fail.c
@@ -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>
/**************************************