diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-04-18 13:06:17 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-04-18 13:06:17 -0700 |
| commit | 832454f38b3ef635ee03fb54c382d8be02ac7c9e (patch) | |
| tree | 140e2675e5181e8be4ddfee8c463bce22e4f99d8 /test/run_tests.cpp | |
| parent | c899368a90fa821f3a7b8c01c195d375073714d8 (diff) | |
| download | zig-832454f38b3ef635ee03fb54c382d8be02ac7c9e.tar.gz zig-832454f38b3ef635ee03fb54c382d8be02ac7c9e.zip | |
move 2 tests to self hosted land
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index 7786c8e98c..7b5b90e4ae 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -430,33 +430,6 @@ pub fn main(args: [][]u8) -> %void { } )SOURCE", "9\n8\n7\n6\n0\n1\n2\n3\n9\n8\n7\n6\n0\n1\n2\n3\n"); - add_simple_case("pointer to void return type", R"SOURCE( -const io = @import("std").io; -const x = void{}; -fn f() -> &void { - %%io.stdout.printf("OK\n"); - return &x; -} -pub fn main(args: [][]u8) -> %void { - const a = f(); - return *a; -} - )SOURCE", "OK\n"); - - add_simple_case("call result of if else expression", R"SOURCE( -const io = @import("std").io; -fn a() -> []u8 { "a\n" } -fn b() -> []u8 { "b\n" } -fn f(x: bool) { - %%io.stdout.printf((if (x) a else b)()); -} -pub fn main(args: [][]u8) -> %void { - f(true); - f(false); -} - )SOURCE", "a\nb\n"); - - add_simple_case_libc("expose function pointer to C land", R"SOURCE( const c = @c_import(@c_include("stdlib.h")); @@ -502,18 +475,6 @@ export fn main(argc: c_int, argv: &&u8) -> c_int { )SOURCE", "3.25\n3\n3.00\n-0.40\n"); - add_simple_case("const expression eval handling of variables", R"SOURCE( -const io = @import("std").io; -pub fn main(args: [][]u8) -> %void { - var x = true; - while (x) { - x = false; - } - %%io.stdout.printf("OK\n"); -} - )SOURCE", "OK\n"); - - add_simple_case("incomplete struct parameter top level decl", R"SOURCE( const io = @import("std").io; struct A { |
