summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmil Gardström <emil.gardstrom@gmail.com>2022-02-25 21:45:58 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2022-03-15 03:58:40 +0100
commit26fed0967cd79d363a3b6f39de29a1f7d9eab0ac (patch)
tree711167378574712b281defb79540a5171f02ea5e /tests
parent4a5ae0884da76d6d8538a6cc607e5dba144842db (diff)
disable some tests on windows
This is due to differences in representation of `signed long` and `unsigned long` on most Linux-based systems and Windows (`64` vs. `32` bits)
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/bitfield_align_2.rs1
-rw-r--r--tests/expectations/tests/enum_explicit_type_constants.rs1
-rw-r--r--tests/expectations/tests/issue-739-pointer-wide-bitfield.rs1
-rw-r--r--tests/expectations/tests/use-core.rs2
-rw-r--r--tests/headers/bitfield_align_2.h2
-rw-r--r--tests/headers/enum_explicit_type_constants.hpp2
-rw-r--r--tests/headers/issue-739-pointer-wide-bitfield.h1
-rw-r--r--tests/headers/use-core.h2
8 files changed, 8 insertions, 4 deletions
diff --git a/tests/expectations/tests/bitfield_align_2.rs b/tests/expectations/tests/bitfield_align_2.rs
index 1a1f7dd8..aa11f80c 100644
--- a/tests/expectations/tests/bitfield_align_2.rs
+++ b/tests/expectations/tests/bitfield_align_2.rs
@@ -4,6 +4,7 @@
non_camel_case_types,
non_upper_case_globals
)]
+#![cfg(not(target_os = "windows"))]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
diff --git a/tests/expectations/tests/enum_explicit_type_constants.rs b/tests/expectations/tests/enum_explicit_type_constants.rs
index 030d64be..117f6847 100644
--- a/tests/expectations/tests/enum_explicit_type_constants.rs
+++ b/tests/expectations/tests/enum_explicit_type_constants.rs
@@ -4,6 +4,7 @@
non_camel_case_types,
non_upper_case_globals
)]
+#![cfg(not(target_os = "windows"))]
pub const Foo_Bar: Foo = 0;
pub const Foo_Qux: Foo = 1;
diff --git a/tests/expectations/tests/issue-739-pointer-wide-bitfield.rs b/tests/expectations/tests/issue-739-pointer-wide-bitfield.rs
index 7d7b7921..1a633844 100644
--- a/tests/expectations/tests/issue-739-pointer-wide-bitfield.rs
+++ b/tests/expectations/tests/issue-739-pointer-wide-bitfield.rs
@@ -4,6 +4,7 @@
non_camel_case_types,
non_upper_case_globals
)]
+#![cfg(not(target_os = "windows"))]
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
diff --git a/tests/expectations/tests/use-core.rs b/tests/expectations/tests/use-core.rs
index d919b6e7..66e3b363 100644
--- a/tests/expectations/tests/use-core.rs
+++ b/tests/expectations/tests/use-core.rs
@@ -4,7 +4,7 @@
non_camel_case_types,
non_upper_case_globals
)]
-
+#![cfg(not(target_os = "windows"))]
extern crate core;
#[repr(C)]
diff --git a/tests/headers/bitfield_align_2.h b/tests/headers/bitfield_align_2.h
index b6a6cd28..cb0f2e20 100644
--- a/tests/headers/bitfield_align_2.h
+++ b/tests/headers/bitfield_align_2.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rustified-enum ".*"
+// bindgen-flags: --rustified-enum ".*" --raw-line '#![cfg(not(target_os="windows"))]'
enum MyEnum {
ONE,
TWO,
diff --git a/tests/headers/enum_explicit_type_constants.hpp b/tests/headers/enum_explicit_type_constants.hpp
index 7deab369..e1ecf6fa 100644
--- a/tests/headers/enum_explicit_type_constants.hpp
+++ b/tests/headers/enum_explicit_type_constants.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: -- -std=c++11
+// bindgen-flags: --raw-line '#![cfg(not(target_os="windows"))]' -- -std=c++11
//
// This test is much like enum_explicit_type, but without --rustified-enum.
diff --git a/tests/headers/issue-739-pointer-wide-bitfield.h b/tests/headers/issue-739-pointer-wide-bitfield.h
index 611dab1d..eeb7ae9c 100644
--- a/tests/headers/issue-739-pointer-wide-bitfield.h
+++ b/tests/headers/issue-739-pointer-wide-bitfield.h
@@ -1,3 +1,4 @@
+// bindgen-flags: --raw-line '#![cfg(not(target_os="windows"))]'
#define POINTER_WIDTH (sizeof(void*) * 8)
struct Foo {
diff --git a/tests/headers/use-core.h b/tests/headers/use-core.h
index b4135b44..5ee0ac6f 100644
--- a/tests/headers/use-core.h
+++ b/tests/headers/use-core.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --use-core --raw-line "extern crate core;" --with-derive-hash --with-derive-partialeq --with-derive-eq
+// bindgen-flags: --use-core --raw-line '#![cfg(not(target_os="windows"))] extern crate core;' --with-derive-hash --with-derive-partialeq --with-derive-eq
struct foo {
int a, b;