Skip to content

Commit ec8fdd3

Browse files
committed
Try to fix tests again
1 parent 757395a commit ec8fdd3

File tree

4 files changed

+13
-22
lines changed

4 files changed

+13
-22
lines changed

tests/structs/src/debug_derive_bad.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ typedef struct {
1010
} c;
1111
} b;
1212
} a;
13-
} S2;
13+
} StructWithUnion;
1414

15-
S2 kS2;
15+
StructWithUnion kStructWithUnion;

tests/structs/src/debug_derive_good.c

+3-7
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ typedef struct {
66
int a;
77
} S1;
88

9-
S1 kS1;
10-
119
typedef struct {
1210
va_list v;
13-
} S3;
11+
} S2;
1412

15-
S3 get_struct_containing_va_list() {
16-
S3 s;
17-
return s;
18-
}
13+
S1 *kS1;
14+
S2 *kS2;
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
//! xfail
22
33
mod debug_derive_bad;
4-
use debug_derive_bad::rust_kS2;
4+
use debug_derive_bad::rust_kStructWithUnion;
55

66
pub fn test_union() {
77
unsafe {
8-
format!("{rust_kS2:?}");
8+
format!("{rust_kStructWithUnion:?}");
99
}
1010
}
+6-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
//! feature_c_variadic,
1+
//! feature_c_variadic
22
3-
use crate::debug_derive_good::{rust_kS1, rust_get_struct_containing_va_list};
3+
use crate::debug_derive_good::{rust_kS1, rust_kS2};
4+
use std::fmt::Debug;
45

5-
pub fn test_simple_struct() {
6+
pub fn test_debuggable() {
67
unsafe {
7-
format!("{rust_kS1:?}");
8+
// Make sure each struct implements `Debug`
9+
let _debuggable: Vec<*mut dyn Debug> = vec![rust_kS1, rust_kS2];
810
}
911
}
10-
11-
pub fn test_struct_containing_va_list() {
12-
unsafe {
13-
let s = rust_get_struct_containing_va_list();
14-
format!("{s:?}");
15-
}
16-
}

0 commit comments

Comments
 (0)