aboutsummaryrefslogtreecommitdiff
path: root/test/run_tests.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-01-12 03:15:06 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-01-12 03:15:06 -0500
commitd7847053531c3352db8355e21e54b102958cbb8a (patch)
treeb360eeecaa1b6624c268054bb2a7d79d4678d591 /test/run_tests.cpp
parent76b1cbc2ea50be928608b80bdd8ab25cd1b964f3 (diff)
downloadzig-d7847053531c3352db8355e21e54b102958cbb8a.tar.gz
zig-d7847053531c3352db8355e21e54b102958cbb8a.zip
IR: implement macro for function aliasing function pointer
Diffstat (limited to 'test/run_tests.cpp')
-rw-r--r--test/run_tests.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp
index cc61a2a684..e5badea1c8 100644
--- a/test/run_tests.cpp
+++ b/test/run_tests.cpp
@@ -202,7 +202,7 @@ static TestCase *add_parseh_case(const char *case_name, AllowWarnings allow_warn
test_case->compiler_args.append("parseh");
test_case->compiler_args.append(tmp_h_path);
- test_case->compiler_args.append("--verbose");
+ //test_case->compiler_args.append("--verbose");
test_cases.append(test_case);
@@ -1883,11 +1883,14 @@ Foo fun(Foo *a);
R"SOURCE(
extern void (*fn_ptr)(void);
#define foo fn_ptr
- )SOURCE", 2,
+
+extern char (*fn_ptr2)(int, float);
+#define bar fn_ptr2
+ )SOURCE", 4,
"pub extern var fn_ptr: ?extern fn();",
- R"SOURCE(pub inline fn foo() {
- (??fn_ptr)();
-})SOURCE");
+ "pub fn foo();",
+ "pub extern var fn_ptr2: ?extern fn(c_int, f32) -> u8;",
+ "pub fn bar(arg0: c_int, arg1: f32) -> u8;");
add_parseh_case("#define string", AllowWarningsNo, R"SOURCE(