diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-28 14:49:34 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-28 14:49:34 -0700 |
| commit | 47c3a30310b142dea390afaf4063a8b078a34f0d (patch) | |
| tree | 83dbd3fddda14da47897a599cfd9f6e34652de7a /test/run_tests.cpp | |
| parent | a09b5055585a869bf5af522d19836e3f2c25fc5b (diff) | |
| download | zig-47c3a30310b142dea390afaf4063a8b078a34f0d.tar.gz zig-47c3a30310b142dea390afaf4063a8b078a34f0d.zip | |
parseh understands simple structs
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index f82a6b63bd..e30200c200 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -1828,6 +1828,17 @@ pub const Foo = enum_Foo;)OUTPUT"); void foo(void *restrict bar, void *restrict); )SOURCE", R"OUTPUT(pub const c_void = u8; pub extern fn foo(noalias bar: ?&c_void, noalias arg1: ?&c_void);)OUTPUT"); + + add_parseh_case("simple struct", R"SOURCE( +struct Foo { + int x; + char *y; +}; + )SOURCE", R"OUTPUT(export struct struct_Foo { + x: c_int, + y: ?&u8, +} +pub const Foo = struct_Foo;)OUTPUT"); } static void print_compiler_invocation(TestCase *test_case) { |
