Skip to content

Commit 26fed09

Browse files
Emilgardisemilio
authored andcommitted
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)
1 parent 4a5ae08 commit 26fed09

8 files changed

+8
-4
lines changed

tests/expectations/tests/bitfield_align_2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
non_camel_case_types,
55
non_upper_case_globals
66
)]
7+
#![cfg(not(target_os = "windows"))]
78

89
#[repr(C)]
910
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]

tests/expectations/tests/enum_explicit_type_constants.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
non_camel_case_types,
55
non_upper_case_globals
66
)]
7+
#![cfg(not(target_os = "windows"))]
78

89
pub const Foo_Bar: Foo = 0;
910
pub const Foo_Qux: Foo = 1;

tests/expectations/tests/issue-739-pointer-wide-bitfield.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
non_camel_case_types,
55
non_upper_case_globals
66
)]
7+
#![cfg(not(target_os = "windows"))]
78

89
#[repr(C)]
910
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]

tests/expectations/tests/use-core.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
non_camel_case_types,
55
non_upper_case_globals
66
)]
7-
7+
#![cfg(not(target_os = "windows"))]
88
extern crate core;
99

1010
#[repr(C)]

tests/headers/bitfield_align_2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --rustified-enum ".*"
1+
// bindgen-flags: --rustified-enum ".*" --raw-line '#![cfg(not(target_os="windows"))]'
22
enum MyEnum {
33
ONE,
44
TWO,

tests/headers/enum_explicit_type_constants.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: -- -std=c++11
1+
// bindgen-flags: --raw-line '#![cfg(not(target_os="windows"))]' -- -std=c++11
22
//
33
// This test is much like enum_explicit_type, but without --rustified-enum.
44

tests/headers/issue-739-pointer-wide-bitfield.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// bindgen-flags: --raw-line '#![cfg(not(target_os="windows"))]'
12
#define POINTER_WIDTH (sizeof(void*) * 8)
23

34
struct Foo {

tests/headers/use-core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --use-core --raw-line "extern crate core;" --with-derive-hash --with-derive-partialeq --with-derive-eq
1+
// bindgen-flags: --use-core --raw-line '#![cfg(not(target_os="windows"))] extern crate core;' --with-derive-hash --with-derive-partialeq --with-derive-eq
22

33
struct foo {
44
int a, b;

0 commit comments

Comments
 (0)