diff options
Diffstat (limited to 'libbindgen/tests')
-rw-r--r-- | libbindgen/tests/expectations/tests/constify-enum.rs | 20 | ||||
-rw-r--r-- | libbindgen/tests/headers/constify-enum.h | 13 |
2 files changed, 33 insertions, 0 deletions
diff --git a/libbindgen/tests/expectations/tests/constify-enum.rs b/libbindgen/tests/expectations/tests/constify-enum.rs new file mode 100644 index 00000000..989c5197 --- /dev/null +++ b/libbindgen/tests/expectations/tests/constify-enum.rs @@ -0,0 +1,20 @@ +/* automatically generated by rust-bindgen */ + + +#![allow(non_snake_case)] + + +pub const nsCSSPropertyID_eCSSProperty_COUNT_unexistingVariantValue: + nsCSSPropertyID = + nsCSSPropertyID::eCSSProperty_COUNT_unexistingVariantValue; +pub const nsCSSPropertyID_eCSSProperty_COUNT: nsCSSPropertyID = + nsCSSPropertyID::eCSSPropertyAlias_aa; +#[repr(u32)] +#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +pub enum nsCSSPropertyID { + eCSSProperty_a = 0, + eCSSProperty_b = 1, + eCSSPropertyAlias_aa = 2, + eCSSPropertyAlias_bb = 3, + eCSSProperty_COUNT_unexistingVariantValue = 4, +} diff --git a/libbindgen/tests/headers/constify-enum.h b/libbindgen/tests/headers/constify-enum.h new file mode 100644 index 00000000..a5b4052c --- /dev/null +++ b/libbindgen/tests/headers/constify-enum.h @@ -0,0 +1,13 @@ + +enum nsCSSPropertyID { + eCSSProperty_a, + eCSSProperty_b, + + eCSSProperty_COUNT, /**< <div rustbindgen constant></div> */ + eCSSProperty_COUNT_DUMMY2 = eCSSProperty_COUNT - 1, /**< <div rustbindgen hide></div> */ + + eCSSPropertyAlias_aa, + eCSSPropertyAlias_bb, + + eCSSProperty_COUNT_unexistingVariantValue, /**< <div rustbindgen constant></div> */ +}; |