diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-01-29 16:06:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-01-29 16:06:17 -0700 |
| commit | e4b0435946ded78b2d4664bf4cf3cf387fe4a12e (patch) | |
| tree | 2005b5a785eb6c9e3bc3f7810946c6fd0ce5a020 /test | |
| parent | 580df2f53055a25fcceb2717975270a6523f417e (diff) | |
| download | zig-e4b0435946ded78b2d4664bf4cf3cf387fe4a12e.tar.gz zig-e4b0435946ded78b2d4664bf4cf3cf387fe4a12e.zip | |
parseh understands variable declarations
and some initializers such as integers
Diffstat (limited to 'test')
| -rw-r--r-- | test/run_tests.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index ba991b163f..b5afdabfcd 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -2011,6 +2011,14 @@ pub extern fn some_func(foo: ?&struct_Foo, x: c_int) -> ?&struct_Foo;)OUTPUT", )SOURCE", 2, "pub const THING1 = 1234;", "pub const THING2 = THING1;"); + + + add_parseh_case("variables", R"SOURCE( +extern int extern_var; +static const int int_var = 13; + )SOURCE", 2, + "pub extern var extern_var: c_int;", + "pub const int_var: c_int = 13;"); } static void print_compiler_invocation(TestCase *test_case) { |
