summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/expectations/tests/union-in-ns_1_0.rs3
-rw-r--r--tests/expectations/tests/union_dtor_1_0.rs3
-rw-r--r--tests/expectations/tests/union_fields_1_0.rs5
-rw-r--r--tests/expectations/tests/union_template_1_0.rs11
-rw-r--r--tests/expectations/tests/union_with_anon_struct.rs2
-rw-r--r--tests/expectations/tests/union_with_anon_struct_1_0.rs7
-rw-r--r--tests/expectations/tests/union_with_anon_struct_bitfield.rs2
-rw-r--r--tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs7
-rw-r--r--tests/expectations/tests/union_with_anon_union_1_0.rs7
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_struct.rs2
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs7
-rw-r--r--tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs7
-rw-r--r--tests/expectations/tests/union_with_big_member_1_0.rs5
-rw-r--r--tests/expectations/tests/union_with_nesting_1_0.rs11
-rw-r--r--tests/headers/union_fields.hpp4
-rw-r--r--tests/headers/union_fields_1_0.hpp2
-rw-r--r--tests/headers/union_template.hpp4
-rw-r--r--tests/headers/union_template_1_0.hpp2
-rw-r--r--tests/headers/union_with_anon_struct.h4
-rw-r--r--tests/headers/union_with_anon_struct_1_0.h2
-rw-r--r--tests/headers/union_with_anon_struct_bitfield.h4
-rw-r--r--tests/headers/union_with_anon_struct_bitfield_1_0.h2
-rw-r--r--tests/headers/union_with_anon_union.h4
-rw-r--r--tests/headers/union_with_anon_union_1_0.h2
-rw-r--r--tests/headers/union_with_anon_unnamed_struct.h4
-rw-r--r--tests/headers/union_with_anon_unnamed_struct_1_0.h2
-rw-r--r--tests/headers/union_with_anon_unnamed_union.h4
-rw-r--r--tests/headers/union_with_anon_unnamed_union_1_0.h2
-rw-r--r--tests/headers/union_with_big_member.h4
-rw-r--r--tests/headers/union_with_big_member_1_0.h2
-rw-r--r--tests/headers/union_with_nesting.h4
-rw-r--r--tests/headers/union_with_nesting_1_0.h2
32 files changed, 83 insertions, 50 deletions
diff --git a/tests/expectations/tests/union-in-ns_1_0.rs b/tests/expectations/tests/union-in-ns_1_0.rs
index 968b1f83..aea426f4 100644
--- a/tests/expectations/tests/union-in-ns_1_0.rs
+++ b/tests/expectations/tests/union-in-ns_1_0.rs
@@ -37,6 +37,9 @@ pub mod root {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+ impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+ }
#[allow(unused_imports)]
use self::super::root;
#[repr(C)]
diff --git a/tests/expectations/tests/union_dtor_1_0.rs b/tests/expectations/tests/union_dtor_1_0.rs
index 6f7eba41..47ed49c2 100644
--- a/tests/expectations/tests/union_dtor_1_0.rs
+++ b/tests/expectations/tests/union_dtor_1_0.rs
@@ -31,6 +31,9 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
#[derive(Debug, Default)]
pub struct UnionWithDtor {
diff --git a/tests/expectations/tests/union_fields_1_0.rs b/tests/expectations/tests/union_fields_1_0.rs
index fd4ac5ab..2bbd90ed 100644
--- a/tests/expectations/tests/union_fields_1_0.rs
+++ b/tests/expectations/tests/union_fields_1_0.rs
@@ -31,8 +31,11 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct nsStyleUnion {
pub mInt: __BindgenUnionField<::std::os::raw::c_int>,
pub mFloat: __BindgenUnionField<f32>,
diff --git a/tests/expectations/tests/union_template_1_0.rs b/tests/expectations/tests/union_template_1_0.rs
index df5e87ee..f322be64 100644
--- a/tests/expectations/tests/union_template_1_0.rs
+++ b/tests/expectations/tests/union_template_1_0.rs
@@ -31,29 +31,32 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Clone, Hash)]
+#[derive(Debug, Default, Copy, Clone, Hash, PartialEq)]
pub struct NastyStruct {
pub mIsSome: bool,
pub mStorage: NastyStruct__bindgen_ty_1,
pub __bindgen_anon_1: NastyStruct__bindgen_ty_2,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Clone, Hash)]
+#[derive(Debug, Default, Copy, Clone, Hash, PartialEq)]
pub struct NastyStruct__bindgen_ty_1 {
pub mFoo: __BindgenUnionField<*mut ::std::os::raw::c_void>,
pub mDummy: __BindgenUnionField<::std::os::raw::c_ulong>,
pub bindgen_union_field: u64,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Clone, Hash)]
+#[derive(Debug, Default, Copy, Clone, Hash, PartialEq)]
pub struct NastyStruct__bindgen_ty_2 {
pub wat: __BindgenUnionField<::std::os::raw::c_short>,
pub wut: __BindgenUnionField<*mut ::std::os::raw::c_int>,
pub bindgen_union_field: u64,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Clone, Hash)]
+#[derive(Debug, Default, Copy, Clone, Hash, PartialEq)]
pub struct Whatever {
pub mTPtr: __BindgenUnionField<*mut ::std::os::raw::c_void>,
pub mInt: __BindgenUnionField<::std::os::raw::c_int>,
diff --git a/tests/expectations/tests/union_with_anon_struct.rs b/tests/expectations/tests/union_with_anon_struct.rs
index e6247bec..3526e674 100644
--- a/tests/expectations/tests/union_with_anon_struct.rs
+++ b/tests/expectations/tests/union_with_anon_struct.rs
@@ -11,7 +11,7 @@ pub union foo {
_bindgen_union_align: [u32; 2usize],
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub a: ::std::os::raw::c_uint,
pub b: ::std::os::raw::c_uint,
diff --git a/tests/expectations/tests/union_with_anon_struct_1_0.rs b/tests/expectations/tests/union_with_anon_struct_1_0.rs
index 5afaa876..a04b59db 100644
--- a/tests/expectations/tests/union_with_anon_struct_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_struct_1_0.rs
@@ -31,14 +31,17 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo {
pub bar: __BindgenUnionField<foo__bindgen_ty_1>,
pub bindgen_union_field: [u32; 2usize],
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub a: ::std::os::raw::c_uint,
pub b: ::std::os::raw::c_uint,
diff --git a/tests/expectations/tests/union_with_anon_struct_bitfield.rs b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
index 955548a0..68ba92e4 100644
--- a/tests/expectations/tests/union_with_anon_struct_bitfield.rs
+++ b/tests/expectations/tests/union_with_anon_struct_bitfield.rs
@@ -12,7 +12,7 @@ pub union foo {
_bindgen_union_align: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub _bitfield_1: u32,
pub __bindgen_align: [u32; 0usize],
diff --git a/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs b/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
index ba1cdf47..29ca26cc 100644
--- a/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_struct_bitfield_1_0.rs
@@ -31,15 +31,18 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo {
pub a: __BindgenUnionField<::std::os::raw::c_int>,
pub __bindgen_anon_1: __BindgenUnionField<foo__bindgen_ty_1>,
pub bindgen_union_field: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub _bitfield_1: u32,
pub __bindgen_align: [u32; 0usize],
diff --git a/tests/expectations/tests/union_with_anon_union_1_0.rs b/tests/expectations/tests/union_with_anon_union_1_0.rs
index 99c0c817..0a96374f 100644
--- a/tests/expectations/tests/union_with_anon_union_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_union_1_0.rs
@@ -31,14 +31,17 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo {
pub bar: __BindgenUnionField<foo__bindgen_ty_1>,
pub bindgen_union_field: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub a: __BindgenUnionField<::std::os::raw::c_uint>,
pub b: __BindgenUnionField<::std::os::raw::c_ushort>,
diff --git a/tests/expectations/tests/union_with_anon_unnamed_struct.rs b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
index 6d0c381e..d5734f03 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_struct.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_struct.rs
@@ -12,7 +12,7 @@ pub union pixel {
_bindgen_union_align: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct pixel__bindgen_ty_1 {
pub r: ::std::os::raw::c_uchar,
pub g: ::std::os::raw::c_uchar,
diff --git a/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs b/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
index afe12dce..277071af 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_struct_1_0.rs
@@ -31,15 +31,18 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct pixel {
pub rgba: __BindgenUnionField<::std::os::raw::c_uint>,
pub __bindgen_anon_1: __BindgenUnionField<pixel__bindgen_ty_1>,
pub bindgen_union_field: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct pixel__bindgen_ty_1 {
pub r: ::std::os::raw::c_uchar,
pub g: ::std::os::raw::c_uchar,
diff --git a/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs b/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
index 67dcd521..3f782a63 100644
--- a/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
+++ b/tests/expectations/tests/union_with_anon_unnamed_union_1_0.rs
@@ -31,15 +31,18 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo {
pub a: __BindgenUnionField<::std::os::raw::c_uint>,
pub __bindgen_anon_1: __BindgenUnionField<foo__bindgen_ty_1>,
pub bindgen_union_field: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub b: __BindgenUnionField<::std::os::raw::c_ushort>,
pub c: __BindgenUnionField<::std::os::raw::c_uchar>,
diff --git a/tests/expectations/tests/union_with_big_member_1_0.rs b/tests/expectations/tests/union_with_big_member_1_0.rs
index 836fe1a5..9ba01a14 100644
--- a/tests/expectations/tests/union_with_big_member_1_0.rs
+++ b/tests/expectations/tests/union_with_big_member_1_0.rs
@@ -31,6 +31,9 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
#[derive(Copy)]
pub struct WithBigArray {
@@ -62,7 +65,7 @@ impl Default for WithBigArray {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct WithBigArray2 {
pub a: __BindgenUnionField<::std::os::raw::c_int>,
pub b: __BindgenUnionField<[::std::os::raw::c_char; 33usize]>,
diff --git a/tests/expectations/tests/union_with_nesting_1_0.rs b/tests/expectations/tests/union_with_nesting_1_0.rs
index 59caccf4..73192a45 100644
--- a/tests/expectations/tests/union_with_nesting_1_0.rs
+++ b/tests/expectations/tests/union_with_nesting_1_0.rs
@@ -31,21 +31,24 @@ impl <T> ::std::fmt::Debug for __BindgenUnionField<T> {
impl <T> ::std::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) { }
}
+impl <T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
+ fn eq(&self, _other: &__BindgenUnionField<T>) -> bool { true }
+}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo {
pub a: __BindgenUnionField<::std::os::raw::c_uint>,
pub __bindgen_anon_1: __BindgenUnionField<foo__bindgen_ty_1>,
pub bindgen_union_field: u32,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1 {
pub __bindgen_anon_1: foo__bindgen_ty_1__bindgen_ty_1,
pub __bindgen_anon_2: foo__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1__bindgen_ty_1 {
pub b1: __BindgenUnionField<::std::os::raw::c_ushort>,
pub b2: __BindgenUnionField<::std::os::raw::c_ushort>,
@@ -78,7 +81,7 @@ impl Clone for foo__bindgen_ty_1__bindgen_ty_1 {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
-#[derive(Debug, Default, Copy, Hash)]
+#[derive(Debug, Default, Copy, Hash, PartialEq)]
pub struct foo__bindgen_ty_1__bindgen_ty_2 {
pub c1: __BindgenUnionField<::std::os::raw::c_ushort>,
pub c2: __BindgenUnionField<::std::os::raw::c_ushort>,
diff --git a/tests/headers/union_fields.hpp b/tests/headers/union_fields.hpp
index dd15d741..7397ad58 100644
--- a/tests/headers/union_fields.hpp
+++ b/tests/headers/union_fields.hpp
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
typedef union {
int mInt;
float mFloat;
diff --git a/tests/headers/union_fields_1_0.hpp b/tests/headers/union_fields_1_0.hpp
index 6f20900f..ef0272f0 100644
--- a/tests/headers/union_fields_1_0.hpp
+++ b/tests/headers/union_fields_1_0.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
typedef union {
int mInt;
diff --git a/tests/headers/union_template.hpp b/tests/headers/union_template.hpp
index c505cb72..fbebb44f 100644
--- a/tests/headers/union_template.hpp
+++ b/tests/headers/union_template.hpp
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
template<typename T>
struct NastyStruct {
bool mIsSome;
diff --git a/tests/headers/union_template_1_0.hpp b/tests/headers/union_template_1_0.hpp
index 22e46bfa..65a11b30 100644
--- a/tests/headers/union_template_1_0.hpp
+++ b/tests/headers/union_template_1_0.hpp
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
template<typename T>
struct NastyStruct {
diff --git a/tests/headers/union_with_anon_struct.h b/tests/headers/union_with_anon_struct.h
index 8f15eb49..5968a48c 100644
--- a/tests/headers/union_with_anon_struct.h
+++ b/tests/headers/union_with_anon_struct.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union foo {
struct {
unsigned int a;
diff --git a/tests/headers/union_with_anon_struct_1_0.h b/tests/headers/union_with_anon_struct_1_0.h
index 8c77734e..a24f5a90 100644
--- a/tests/headers/union_with_anon_struct_1_0.h
+++ b/tests/headers/union_with_anon_struct_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union foo {
struct {
diff --git a/tests/headers/union_with_anon_struct_bitfield.h b/tests/headers/union_with_anon_struct_bitfield.h
index d2ceac0d..8a6a6a74 100644
--- a/tests/headers/union_with_anon_struct_bitfield.h
+++ b/tests/headers/union_with_anon_struct_bitfield.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union foo {
int a;
struct {
diff --git a/tests/headers/union_with_anon_struct_bitfield_1_0.h b/tests/headers/union_with_anon_struct_bitfield_1_0.h
index f73591ec..ae069c50 100644
--- a/tests/headers/union_with_anon_struct_bitfield_1_0.h
+++ b/tests/headers/union_with_anon_struct_bitfield_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union foo {
int a;
diff --git a/tests/headers/union_with_anon_union.h b/tests/headers/union_with_anon_union.h
index 730e17bb..8f76cbde 100644
--- a/tests/headers/union_with_anon_union.h
+++ b/tests/headers/union_with_anon_union.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union foo {
union {
unsigned int a;
diff --git a/tests/headers/union_with_anon_union_1_0.h b/tests/headers/union_with_anon_union_1_0.h
index cd6654d1..77876c08 100644
--- a/tests/headers/union_with_anon_union_1_0.h
+++ b/tests/headers/union_with_anon_union_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union foo {
union {
diff --git a/tests/headers/union_with_anon_unnamed_struct.h b/tests/headers/union_with_anon_unnamed_struct.h
index 0d00c688..5214db4c 100644
--- a/tests/headers/union_with_anon_unnamed_struct.h
+++ b/tests/headers/union_with_anon_unnamed_struct.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union pixel {
unsigned int rgba;
struct {
diff --git a/tests/headers/union_with_anon_unnamed_struct_1_0.h b/tests/headers/union_with_anon_unnamed_struct_1_0.h
index be649c3f..a9954535 100644
--- a/tests/headers/union_with_anon_unnamed_struct_1_0.h
+++ b/tests/headers/union_with_anon_unnamed_struct_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union pixel {
unsigned int rgba;
diff --git a/tests/headers/union_with_anon_unnamed_union.h b/tests/headers/union_with_anon_unnamed_union.h
index 163d3157..74345dd8 100644
--- a/tests/headers/union_with_anon_unnamed_union.h
+++ b/tests/headers/union_with_anon_unnamed_union.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union foo {
unsigned int a;
union {
diff --git a/tests/headers/union_with_anon_unnamed_union_1_0.h b/tests/headers/union_with_anon_unnamed_union_1_0.h
index 1d0421c9..bae55773 100644
--- a/tests/headers/union_with_anon_unnamed_union_1_0.h
+++ b/tests/headers/union_with_anon_unnamed_union_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union foo {
unsigned int a;
diff --git a/tests/headers/union_with_big_member.h b/tests/headers/union_with_big_member.h
index 24d012da..7bff36ea 100644
--- a/tests/headers/union_with_big_member.h
+++ b/tests/headers/union_with_big_member.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union WithBigArray {
int a;
int b[33];
diff --git a/tests/headers/union_with_big_member_1_0.h b/tests/headers/union_with_big_member_1_0.h
index 9f2dfd28..2cffd2c5 100644
--- a/tests/headers/union_with_big_member_1_0.h
+++ b/tests/headers/union_with_big_member_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union WithBigArray {
int a;
diff --git a/tests/headers/union_with_nesting.h b/tests/headers/union_with_nesting.h
index f3135b47..95c55581 100644
--- a/tests/headers/union_with_nesting.h
+++ b/tests/headers/union_with_nesting.h
@@ -1,5 +1,5 @@
-// bindgen-flags: --with-derive-hash
-
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
+//
union foo {
unsigned int a;
struct {
diff --git a/tests/headers/union_with_nesting_1_0.h b/tests/headers/union_with_nesting_1_0.h
index bfd59635..e89c3212 100644
--- a/tests/headers/union_with_nesting_1_0.h
+++ b/tests/headers/union_with_nesting_1_0.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --rust-target 1.0 --with-derive-hash
+// bindgen-flags: --rust-target 1.0 --with-derive-hash --with-derive-partialeq
union foo {
unsigned int a;