summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhiting Zhu <zzhu@mozilla.com>2017-08-10 16:56:12 -0700
committerZhiting Zhu <zzhu@mozilla.com>2017-08-14 10:19:14 -0700
commit919cbbac48557940b5a197f6f350df40333e39ad (patch)
tree5d39e200ba7edc07b294343ebe3b66974cf1860d
parent6560ed24e0780640e25d2a43be57891f9709f2cf (diff)
Complex float related tests for derive PartialEq
-rw-r--r--tests/expectations/tests/complex.rs8
-rw-r--r--tests/headers/complex.h2
-rw-r--r--tests/headers/complex_global.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/expectations/tests/complex.rs b/tests/expectations/tests/complex.rs
index 08d5d453..805733c7 100644
--- a/tests/expectations/tests/complex.rs
+++ b/tests/expectations/tests/complex.rs
@@ -11,7 +11,7 @@ pub struct __BindgenComplex<T> {
pub im: T,
}
#[repr(C)]
-#[derive(Debug, Default, Copy)]
+#[derive(Debug, Default, Copy, PartialEq)]
pub struct TestDouble {
pub mMember: __BindgenComplex<f64>,
}
@@ -31,7 +31,7 @@ impl Clone for TestDouble {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
-#[derive(Debug, Copy, Hash)]
+#[derive(Debug, Copy, Hash, PartialEq)]
pub struct TestDoublePtr {
pub mMember: *mut __BindgenComplex<f64>,
}
@@ -54,7 +54,7 @@ impl Default for TestDoublePtr {
fn default() -> Self { unsafe { ::std::mem::zeroed() } }
}
#[repr(C)]
-#[derive(Debug, Default, Copy)]
+#[derive(Debug, Default, Copy, PartialEq)]
pub struct TestFloat {
pub mMember: __BindgenComplex<f32>,
}
@@ -74,7 +74,7 @@ impl Clone for TestFloat {
fn clone(&self) -> Self { *self }
}
#[repr(C)]
-#[derive(Debug, Copy, Hash)]
+#[derive(Debug, Copy, Hash, PartialEq)]
pub struct TestFloatPtr {
pub mMember: *mut __BindgenComplex<f32>,
}
diff --git a/tests/headers/complex.h b/tests/headers/complex.h
index 9696b606..d0fb05b4 100644
--- a/tests/headers/complex.h
+++ b/tests/headers/complex.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --with-derive-hash
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
#define COMPLEX_TEST(ty_, name_) \
struct Test##name_ { \
diff --git a/tests/headers/complex_global.h b/tests/headers/complex_global.h
index 7b9e8872..6ceb62da 100644
--- a/tests/headers/complex_global.h
+++ b/tests/headers/complex_global.h
@@ -1,4 +1,4 @@
-// bindgen-flags: --with-derive-hash
+// bindgen-flags: --with-derive-hash --with-derive-partialeq
float _Complex globalValueFloat;
double _Complex globalValueDouble;
long double _Complex globalValueLongDouble;