aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index 5d61da6cd1..89a6a9bee9 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -2108,6 +2108,19 @@ Foo fun(Foo *a);
"pub type c_void = u8;",
"pub const Foo = c_void;",
"pub extern fn fun(a: ?&c_void);");
+
+ add_parseh_case("ignore #define for non-const", R"SOURCE(
+struct Foo {
+ int x;
+};
+extern void (*fn_ptr)(void);
+#define Foo fn_ptr
+ )SOURCE", 3,
+ "pub type c_void = u8;",
+ "pub const Foo = struct_Foo;",
+ R"OUTPUT(export struct struct_Foo {
+ x: c_int,
+})OUTPUT");
}
static void print_compiler_invocation(TestCase *test_case) {