summaryrefslogtreecommitdiff
path: root/bindgen-tests/tests/headers/enum.h
diff options
context:
space:
mode:
Diffstat (limited to 'bindgen-tests/tests/headers/enum.h')
-rw-r--r--bindgen-tests/tests/headers/enum.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/bindgen-tests/tests/headers/enum.h b/bindgen-tests/tests/headers/enum.h
new file mode 100644
index 00000000..0147433e
--- /dev/null
+++ b/bindgen-tests/tests/headers/enum.h
@@ -0,0 +1,31 @@
+// A few tests for enum-related issues that should be tested with all the enum
+// representations.
+
+struct foo {
+ enum {
+ FOO_A,
+ FOO_B,
+ } member;
+};
+
+enum Foo {
+ Bar = 0,
+ Qux
+};
+
+enum Neg {
+ MinusOne = -1,
+ One = 1,
+};
+
+/** <div rustbindgen nodebug></div> */
+enum NoDebug {
+ NoDebug1,
+ NoDebug2,
+};
+
+/** <div rustbindgen derive="Debug"></div> */
+enum Debug {
+ Debug1,
+ Debug2,
+}; \ No newline at end of file