From b83da2729fc83663f979da05201920e039ae3c3f Mon Sep 17 00:00:00 2001 From: Emilio Cobos Álvarez Date: Sun, 22 Jan 2017 12:58:12 +0100 Subject: Unify under the `bindgen` name. --- tests/headers/class_with_inner_struct.hpp | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 tests/headers/class_with_inner_struct.hpp (limited to 'tests/headers/class_with_inner_struct.hpp') diff --git a/tests/headers/class_with_inner_struct.hpp b/tests/headers/class_with_inner_struct.hpp new file mode 100644 index 00000000..ec729fe6 --- /dev/null +++ b/tests/headers/class_with_inner_struct.hpp @@ -0,0 +1,43 @@ +// bindgen-flags: -- -std=c++11 + +class A { + unsigned c; + struct Segment { int begin, end; }; + union { + int f; + } named_union; + union { + int d; + }; +}; + +class B { + unsigned d; + struct Segment { int begin, end; }; +}; + + +enum class StepSyntax { + Keyword, // step-start and step-end + FunctionalWithoutKeyword, // steps(...) + FunctionalWithStartKeyword, // steps(..., start) + FunctionalWithEndKeyword, // steps(..., end) +}; + +class C { + unsigned d; + union { + struct { + float mX1; + float mY1; + float mX2; + float mY2; + } mFunc; + struct { + StepSyntax mStepSyntax; + unsigned int mSteps; + }; + }; + // To ensure it doesn't collide + struct Segment { int begin, end; }; +}; -- cgit v1.2.3