From ed3117a77fffa424e7f902059a7bf3a52f758bfc Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 28 Jan 2016 15:41:12 -0700 Subject: parseh understands elaborated structs and enums --- test/run_tests.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'test/run_tests.cpp') diff --git a/test/run_tests.cpp b/test/run_tests.cpp index e30200c200..afd7635caa 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1839,6 +1839,30 @@ struct Foo { y: ?&u8, } pub const Foo = struct_Foo;)OUTPUT"); + + add_parseh_case("qualified struct and enum", R"SOURCE( +struct Foo { + int x; + int y; +}; +enum Bar { + BarA, + BarB, +}; +void func(struct Foo *a, enum Bar **b); + )SOURCE", R"OUTPUT(export struct struct_Foo { + x: c_int, + y: c_int, +} +export enum enum_Bar { + A, + B, +} +pub const BarA = enum_Bar.A; +pub const BarB = enum_Bar.B; +pub extern fn func(a: ?&struct_Foo, b: ?&?&enum_Bar); +pub const Foo = struct_Foo; +pub const Bar = enum_Bar;)OUTPUT"); } static void print_compiler_invocation(TestCase *test_case) { -- cgit v1.2.3