From e4b0435946ded78b2d4664bf4cf3cf387fe4a12e Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 29 Jan 2016 16:06:17 -0700 Subject: parseh understands variable declarations and some initializers such as integers --- test/run_tests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/run_tests.cpp') 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) { -- cgit v1.2.3