summaryrefslogtreecommitdiff
path: root/tests/headers/constify-module-enums-types.hpp
diff options
context:
space:
mode:
authorTravis Finkenauer <tmfinken@gmail.com>2017-06-16 01:32:13 -0700
committerTravis Finkenauer <tmfinken@gmail.com>2017-06-16 01:32:13 -0700
commit977ec6f7b1cafc14e2550e2ced49eaa584ee1297 (patch)
treea42f3eb6dee4c20e8fa761d674470c8acca035a3 /tests/headers/constify-module-enums-types.hpp
parentfb9959a647d446a6433b669215bda42c1da70cad (diff)
Add more constified module enum tests
Diffstat (limited to 'tests/headers/constify-module-enums-types.hpp')
-rw-r--r--tests/headers/constify-module-enums-types.hpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/headers/constify-module-enums-types.hpp b/tests/headers/constify-module-enums-types.hpp
new file mode 100644
index 00000000..5a40157f
--- /dev/null
+++ b/tests/headers/constify-module-enums-types.hpp
@@ -0,0 +1,30 @@
+// bindgen-flags: --constified-enum-module foo
+
+typedef enum foo {
+ THIS,
+ SHOULD_BE,
+ A_CONSTANT,
+ ALSO_THIS = 42,
+ AND_ALSO_THIS = 42,
+} foo;
+
+namespace ns1 {
+ typedef enum foo2 {
+ THIS,
+ SHOULD_BE,
+ A_CONSTANT,
+ ALSO_THIS = 42,
+ } foo2;
+}
+
+typedef foo foo_alias1;
+typedef foo_alias1 foo_alias2;
+
+typedef struct bar {
+ foo member1;
+ foo_alias1 member2;
+ foo_alias2 member3;
+} bar;
+
+foo *func1(foo arg1, foo *arg2, foo **arg3);
+foo_alias1 *func2(foo_alias1 arg1, foo_alias1 *arg2, foo_alias1 **arg3); \ No newline at end of file