summaryrefslogtreecommitdiff
path: root/tests/headers/constify-module-enums-types.hpp
diff options
context:
space:
mode:
authorTravis Finkenauer <tmfinken@gmail.com>2017-06-20 22:05:34 -0700
committerTravis Finkenauer <tmfinken@gmail.com>2017-06-20 22:05:34 -0700
commit814d28e0f256a24865f633b5992ced6f035d6f4c (patch)
tree5969fecb13d112182d629a7461c9571d705fc1b9 /tests/headers/constify-module-enums-types.hpp
parent465e242752109591f6d8986c31761dda97ab43c7 (diff)
Simplify is_constified_enum_module
Used suggested code from @emilio and also added a test for an alias to an anonymous enum.
Diffstat (limited to 'tests/headers/constify-module-enums-types.hpp')
-rw-r--r--tests/headers/constify-module-enums-types.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/headers/constify-module-enums-types.hpp b/tests/headers/constify-module-enums-types.hpp
index 1618b269..2c652499 100644
--- a/tests/headers/constify-module-enums-types.hpp
+++ b/tests/headers/constify-module-enums-types.hpp
@@ -8,6 +8,12 @@ typedef enum foo {
AND_ALSO_THIS = 42,
} foo;
+
+typedef enum {
+ Variant1, Variant2, Variant3,
+} anon_enum;
+
+
namespace ns1 {
typedef enum {
THIS,
@@ -28,6 +34,10 @@ typedef foo foo_alias1;
typedef foo_alias1 foo_alias2;
typedef foo_alias2 foo_alias3;
+typedef anon_enum anon_enum_alias1;
+typedef anon_enum_alias1 anon_enum_alias2;
+typedef anon_enum_alias2 anon_enum_alias3;
+
typedef struct bar {
foo member1;
foo_alias1 member2;
@@ -35,6 +45,10 @@ typedef struct bar {
foo_alias3 member4;
ns1::foo member5;
ns2::Foo *member6;
+ anon_enum member7;
+ anon_enum_alias1 member8;
+ anon_enum_alias2 member9;
+ anon_enum_alias3 member10;
} bar;
class Baz {