mirror of
https://gitee.com/openharmony/third_party_rust_bindgen
synced 2024-12-13 18:27:14 +00:00
Add failing regression test for #1973.
This commit is contained in:
parent
e0f06c7fb2
commit
c509ef12ac
@ -135,3 +135,12 @@ Seventh::assert(bool first,
|
||||
int my_prefixed_function_name() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
Coord coord(double x, double y, double z, double t) {
|
||||
Coord res;
|
||||
res.v[0] = x;
|
||||
res.v[1] = y;
|
||||
res.v[2] = z;
|
||||
res.v[3] = t;
|
||||
return res;
|
||||
}
|
||||
|
@ -226,3 +226,9 @@ struct my_prefixed_templated_foo {
|
||||
my_prefixed_templated_foo<my_prefixed_baz> TEMPLATED_CONST_VALUE;
|
||||
|
||||
void my_prefixed_function_to_remove();
|
||||
|
||||
typedef union {
|
||||
double v[4];
|
||||
} Coord;
|
||||
|
||||
Coord coord(double x, double y, double z, double t);
|
||||
|
@ -259,3 +259,12 @@ fn test_macro_customintkind_path() {
|
||||
let v: &std::any::Any = &bindings::TESTMACRO_CUSTOMINTKIND_PATH;
|
||||
assert!(v.is::<MacroInteger>())
|
||||
}
|
||||
|
||||
// https://github.com/rust-lang/rust-bindgen/issues/1973
|
||||
#[test]
|
||||
fn test_homogeneous_aggregate_float_union() {
|
||||
unsafe {
|
||||
let coord = &bindings::coord(1., 2., 3., 4.);
|
||||
assert_eq!([1., 2., 3., 4.], coord.v)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user