Skip to content

Commit ce1a907

Browse files
committed
ctest: add tests for field offset, size, and type.
1 parent f8c6157 commit ce1a907

18 files changed

+1383
-29
lines changed

ctest-next/src/ast/structure.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use crate::{BoxStr, Field};
55
pub struct Struct {
66
pub(crate) public: bool,
77
pub(crate) ident: BoxStr,
8-
#[expect(unused)]
98
pub(crate) fields: Vec<Field>,
109
}
1110

ctest-next/src/ast/union.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub struct Union {
66
#[expect(unused)]
77
pub(crate) public: bool,
88
pub(crate) ident: BoxStr,
9-
#[expect(unused)]
109
pub(crate) fields: Vec<Field>,
1110
}
1211

ctest-next/src/generator.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ pub struct TestGenerator {
3838
pub(crate) defines: Vec<(String, Option<String>)>,
3939
cfg: Vec<(String, Option<String>)>,
4040
mapped_names: Vec<MappedName>,
41-
skips: Vec<Skip>,
41+
pub(crate) skips: Vec<Skip>,
4242
verbose_skip: bool,
43-
volatile_items: Vec<VolatileItem>,
43+
pub(crate) volatile_items: Vec<VolatileItem>,
4444
array_arg: Option<ArrayArg>,
4545
skip_private: bool,
4646
skip_roundtrip: Option<SkipTest>,
@@ -872,7 +872,6 @@ impl TestGenerator {
872872
let mut ffi_items = FfiItems::new();
873873
ffi_items.visit_file(&ast);
874874

875-
// FIXME(ctest): Does not filter out tests for fields.
876875
self.filter_ffi_items(&mut ffi_items);
877876

878877
let output_directory = self

ctest-next/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,7 @@ pub(crate) enum MapInput<'a> {
5656
Struct(&'a Struct),
5757
Union(&'a Union),
5858
Fn(&'a crate::Fn),
59-
#[expect(unused)]
6059
StructField(&'a Struct, &'a Field),
61-
#[expect(unused)]
6260
UnionField(&'a Union, &'a Field),
6361
Alias(&'a Type),
6462
Const(&'a Const),
@@ -67,9 +65,7 @@ pub(crate) enum MapInput<'a> {
6765
/// This variant is used for renaming the struct type.
6866
StructType(&'a str),
6967
UnionType(&'a str),
70-
#[expect(unused)]
7168
StructFieldType(&'a Struct, &'a Field),
72-
#[expect(unused)]
7369
UnionFieldType(&'a Union, &'a Field),
7470
}
7571

0 commit comments

Comments
 (0)