diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-28 15:41:12 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-28 15:41:12 -0700 |
| commit | ed3117a77fffa424e7f902059a7bf3a52f758bfc (patch) | |
| tree | f74d9b0bdd6b574daf54de1dfdcafb4e3c9bcdf3 /test/run_tests.cpp | |
| parent | 47c3a30310b142dea390afaf4063a8b078a34f0d (diff) | |
| download | zig-ed3117a77fffa424e7f902059a7bf3a52f758bfc.tar.gz zig-ed3117a77fffa424e7f902059a7bf3a52f758bfc.zip | |
parseh understands elaborated structs and enums
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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) { |
