summaryrefslogtreecommitdiff
path: root/tests/headers/newtype-enum.hpp
diff options
context:
space:
mode:
authorDavid Vo <auscompgeek@users.noreply.github.com>2019-11-14 22:55:05 +1100
committerEmilio Cobos Álvarez <emilio@crisal.io>2019-11-14 17:35:38 +0100
commitac498475e04b44e3c555002213fa9cba0658198e (patch)
tree748c5addf3c70199cfae791e8741708707620f3d /tests/headers/newtype-enum.hpp
parentf27fe97089b5c124dae4afbbbfeb66a3b44579d5 (diff)
Add newtype enum style
This adds an enum style similar to the existing bitfield style, without the bitwise operator impls. Closes: #1669
Diffstat (limited to 'tests/headers/newtype-enum.hpp')
-rw-r--r--tests/headers/newtype-enum.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/headers/newtype-enum.hpp b/tests/headers/newtype-enum.hpp
new file mode 100644
index 00000000..890683ae
--- /dev/null
+++ b/tests/headers/newtype-enum.hpp
@@ -0,0 +1,8 @@
+// bindgen-flags: --newtype-enum "Foo" --rust-target 1.28 -- -std=c++11
+
+enum Foo {
+ Bar = 1 << 1,
+ Baz = 1 << 2,
+ Duplicated = 1 << 2,
+ Negative = -3,
+};