Skip to content

Commit

Permalink
Expand ignored.rs test to cover associated items
Browse files Browse the repository at this point in the history
  • Loading branch information
scovich committed May 2, 2024
1 parent ca78140 commit b7e8980
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions tests/rust/ignore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,38 @@ pub extern "C" fn another_root() {}

#[no_mangle]
pub extern "C" fn no_ignore_root() {}

/// cbindgen:ignore
#[repr(C)]
pub struct IgnoredStruct {}

pub struct IgnoredStructImpl;

/// cbindgen:ignore
impl IgnoredStructImpl {}

/// cbindgen:ignore
pub const IGNORED_CONST: u32 = 0;

pub const NOT_IGNORED_CONST: u32 = 0;

pub struct StructWithIgnoredImplMembers;

impl StructWithIgnoredImplMembers {
/// cbindgen:ignore
#[no_mangle]
pub extern "C" fn ignored_associated_method() {}

#[no_mangle]
pub extern "C" fn no_ignore_associated_method() {}

/// cbindgen:ignore
pub const IGNORED_INNER_CONST: u32 = 0;

pub const NOT_IGNORED_INNER_CONST: u32 = 0;
}

/// cbindgen:ignore
enum IgnoredEnum {}

enum NotIgnoredEnum {}

0 comments on commit b7e8980

Please sign in to comment.