summaryrefslogtreecommitdiff
path: root/tests/headers/ord-enum.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/headers/ord-enum.h')
-rw-r--r--tests/headers/ord-enum.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/headers/ord-enum.h b/tests/headers/ord-enum.h
new file mode 100644
index 00000000..364f711e
--- /dev/null
+++ b/tests/headers/ord-enum.h
@@ -0,0 +1,15 @@
+// bindgen-flags: --rustified-enum * --with-derive-ord
+
+enum A {
+ A0 = 0,
+ A1 = 1,
+ A2 = 2,
+ A3 = A0 - 1,
+};
+
+enum B {
+ B0 = 1,
+ B1 = B0 + 3,
+ B2 = B0 + 2,
+ B3 = B0 - 2,
+}; \ No newline at end of file