Skip to content

ctest: add tests for field size, offset, and field ptr #4561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ctest-next/src/ast/structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{BoxStr, Field};
pub struct Struct {
pub(crate) public: bool,
pub(crate) ident: BoxStr,
#[expect(unused)]
pub(crate) fields: Vec<Field>,
}

Expand Down
1 change: 0 additions & 1 deletion ctest-next/src/ast/union.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ pub struct Union {
#[expect(unused)]
pub(crate) public: bool,
pub(crate) ident: BoxStr,
#[expect(unused)]
pub(crate) fields: Vec<Field>,
}

Expand Down
5 changes: 2 additions & 3 deletions ctest-next/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ pub struct TestGenerator {
pub(crate) defines: Vec<(String, Option<String>)>,
cfg: Vec<(String, Option<String>)>,
mapped_names: Vec<MappedName>,
skips: Vec<Skip>,
pub(crate) skips: Vec<Skip>,
verbose_skip: bool,
volatile_items: Vec<VolatileItem>,
pub(crate) volatile_items: Vec<VolatileItem>,
array_arg: Option<ArrayArg>,
skip_private: bool,
skip_roundtrip: Option<SkipTest>,
Expand Down Expand Up @@ -872,7 +872,6 @@ impl TestGenerator {
let mut ffi_items = FfiItems::new();
ffi_items.visit_file(&ast);

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

let output_directory = self
Expand Down
4 changes: 0 additions & 4 deletions ctest-next/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ pub(crate) enum MapInput<'a> {
Struct(&'a Struct),
Union(&'a Union),
Fn(&'a crate::Fn),
#[expect(unused)]
StructField(&'a Struct, &'a Field),
#[expect(unused)]
UnionField(&'a Union, &'a Field),
Alias(&'a Type),
Const(&'a Const),
Expand All @@ -67,9 +65,7 @@ pub(crate) enum MapInput<'a> {
/// This variant is used for renaming the struct type.
StructType(&'a str),
UnionType(&'a str),
#[expect(unused)]
StructFieldType(&'a Struct, &'a Field),
#[expect(unused)]
UnionFieldType(&'a Union, &'a Field),
}

Expand Down
Loading
Loading