From dad36fef3db6aaf486bc28af25d8d99b6a6cd6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 30 Oct 2018 22:30:28 +0100 Subject: [PATCH] Test the interaction between include and prefix configurations. This broke mozilla-central once, hopefully not twice :) --- tests/expectations/both/item_types_renamed.c | 9 +++++++++ tests/expectations/item_types_renamed.c | 9 +++++++++ tests/expectations/item_types_renamed.cpp | 7 +++++++ tests/expectations/tag/item_types_renamed.c | 9 +++++++++ tests/rust/item_types_renamed.rs | 12 ++++++++++++ tests/rust/item_types_renamed.toml | 4 ++++ 6 files changed, 50 insertions(+) create mode 100644 tests/expectations/both/item_types_renamed.c create mode 100644 tests/expectations/item_types_renamed.c create mode 100644 tests/expectations/item_types_renamed.cpp create mode 100644 tests/expectations/tag/item_types_renamed.c create mode 100644 tests/rust/item_types_renamed.rs create mode 100644 tests/rust/item_types_renamed.toml diff --git a/tests/expectations/both/item_types_renamed.c b/tests/expectations/both/item_types_renamed.c new file mode 100644 index 0000000..d57be96 --- /dev/null +++ b/tests/expectations/both/item_types_renamed.c @@ -0,0 +1,9 @@ +#include +#include +#include + +enum StyleOnlyThisShouldBeGenerated { + Foo, + Bar, +}; +typedef uint8_t StyleOnlyThisShouldBeGenerated; diff --git a/tests/expectations/item_types_renamed.c b/tests/expectations/item_types_renamed.c new file mode 100644 index 0000000..d57be96 --- /dev/null +++ b/tests/expectations/item_types_renamed.c @@ -0,0 +1,9 @@ +#include +#include +#include + +enum StyleOnlyThisShouldBeGenerated { + Foo, + Bar, +}; +typedef uint8_t StyleOnlyThisShouldBeGenerated; diff --git a/tests/expectations/item_types_renamed.cpp b/tests/expectations/item_types_renamed.cpp new file mode 100644 index 0000000..36152a3 --- /dev/null +++ b/tests/expectations/item_types_renamed.cpp @@ -0,0 +1,7 @@ +#include +#include + +enum class StyleOnlyThisShouldBeGenerated : uint8_t { + Foo, + Bar, +}; diff --git a/tests/expectations/tag/item_types_renamed.c b/tests/expectations/tag/item_types_renamed.c new file mode 100644 index 0000000..d57be96 --- /dev/null +++ b/tests/expectations/tag/item_types_renamed.c @@ -0,0 +1,9 @@ +#include +#include +#include + +enum StyleOnlyThisShouldBeGenerated { + Foo, + Bar, +}; +typedef uint8_t StyleOnlyThisShouldBeGenerated; diff --git a/tests/rust/item_types_renamed.rs b/tests/rust/item_types_renamed.rs new file mode 100644 index 0000000..b54b0ef --- /dev/null +++ b/tests/rust/item_types_renamed.rs @@ -0,0 +1,12 @@ + +pub const MY_CONST: u8 = 4; + +#[no_mangle] +pub extern "C" fn ExternFunction() { +} + +#[repr(u8)] +pub enum OnlyThisShouldBeGenerated { + Foo, + Bar, +} diff --git a/tests/rust/item_types_renamed.toml b/tests/rust/item_types_renamed.toml new file mode 100644 index 0000000..4680ee8 --- /dev/null +++ b/tests/rust/item_types_renamed.toml @@ -0,0 +1,4 @@ +[export] +item_types = ["enums"] +include = ["OnlyThisShouldBeGenerated"] +prefix = "Style"