Skip to content

Commit 133ac06

Browse files
committed
feat(tests): add cli test for custom fn attributes
1 parent a5add12 commit 133ac06

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

bindgen-tests/tests/expectations/tests/attribute-custom-cli.rs

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/headers/attribute-custom-cli.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// bindgen-flags: --default-enum-style rust --default-non-copy-union-style manually_drop --no-default=".*" --no-hash=".*" --no-partialeq=".*" --no-debug=".*" --no-copy=".*" --with-attribute-custom="foo_[^e].*=#[doc(hidden)]" --with-attribute-custom-struct="foo.*=#[derive(Default)]" --with-attribute-custom-enum="foo.*=#[cfg_attr(test, derive(PartialOrd, Copy))]" --with-attribute-custom-union="foo.*=#[derive(Clone)],#[derive(Copy)]"
1+
// bindgen-flags: --default-enum-style rust --default-non-copy-union-style manually_drop --no-default=".*" --no-hash=".*" --no-partialeq=".*" --no-debug=".*" --no-copy=".*" --with-attribute-custom="foo_[^e].*=#[doc(hidden)]" --with-attribute-custom-struct="foo.*=#[derive(Default)]" --with-attribute-custom-enum="foo.*=#[cfg_attr(test, derive(PartialOrd, Copy))]" --with-attribute-custom-union="foo.*=#[derive(Clone)],#[derive(Copy)]" --with-attribute-custom-function="foo.*=#[must_use],#[doc(hidden)]"
22
struct foo_struct {
33
int inner;
44
};
@@ -12,3 +12,4 @@ union foo_union {
1212
struct non_matching {
1313
int inner;
1414
};
15+
int foo_function() { return 1; }

0 commit comments

Comments
 (0)