diff options
Diffstat (limited to 'tests/tests.rs')
-rw-r--r-- | tests/tests.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index cc64cfdd..7b46df5e 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -670,3 +670,19 @@ fn dump_preprocessed_input() { "cpp-empty-layout.hpp is in the preprocessed file" ); } + +#[test] +fn allowlist_warnings() { + let header = concat!( + env!("CARGO_MANIFEST_DIR"), + "/tests/headers/allowlist_warnings.h" + ); + + let mut bindings = builder() + .header(header) + .allowlist_function("doesnt_match_anything") + .generate() + .expect("unable to generate bindings"); + + assert_eq!(1, bindings.take_warnings().count()); +} |