| ... | @@ -8,6 +8,9 @@ const expectError = std.testing.expectError; | ... | @@ -8,6 +8,9 @@ const expectError = std.testing.expectError; |
| 8 | var global_x: i32 = 1; | 8 | var global_x: i32 = 1; |
| 9 | | 9 | |
| 10 | test "simple coroutine suspend and resume" { | 10 | test "simple coroutine suspend and resume" { |
| | 11 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 12 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 13 | |
| 11 | var frame = async simpleAsyncFn(); | 14 | var frame = async simpleAsyncFn(); |
| 12 | try expect(global_x == 2); | 15 | try expect(global_x == 2); |
| 13 | resume frame; | 16 | resume frame; |
| ... | @@ -28,6 +31,9 @@ fn simpleAsyncFn() void { | ... | @@ -28,6 +31,9 @@ fn simpleAsyncFn() void { |
| 28 | var global_y: i32 = 1; | 31 | var global_y: i32 = 1; |
| 29 | | 32 | |
| 30 | test "pass parameter to coroutine" { | 33 | test "pass parameter to coroutine" { |
| | 34 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 35 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 36 | |
| 31 | var p = async simpleAsyncFnWithArg(2); | 37 | var p = async simpleAsyncFnWithArg(2); |
| 32 | try expect(global_y == 3); | 38 | try expect(global_y == 3); |
| 33 | resume p; | 39 | resume p; |
| ... | @@ -40,6 +46,9 @@ fn simpleAsyncFnWithArg(delta: i32) void { | ... | @@ -40,6 +46,9 @@ fn simpleAsyncFnWithArg(delta: i32) void { |
| 40 | } | 46 | } |
| 41 | | 47 | |
| 42 | test "suspend at end of function" { | 48 | test "suspend at end of function" { |
| | 49 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 50 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 51 | |
| 43 | const S = struct { | 52 | const S = struct { |
| 44 | var x: i32 = 1; | 53 | var x: i32 = 1; |
| 45 | | 54 | |
| ... | @@ -59,6 +68,9 @@ test "suspend at end of function" { | ... | @@ -59,6 +68,9 @@ test "suspend at end of function" { |
| 59 | } | 68 | } |
| 60 | | 69 | |
| 61 | test "local variable in async function" { | 70 | test "local variable in async function" { |
| | 71 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 72 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 73 | |
| 62 | const S = struct { | 74 | const S = struct { |
| 63 | var x: i32 = 0; | 75 | var x: i32 = 0; |
| 64 | | 76 | |
| ... | @@ -88,6 +100,9 @@ test "local variable in async function" { | ... | @@ -88,6 +100,9 @@ test "local variable in async function" { |
| 88 | } | 100 | } |
| 89 | | 101 | |
| 90 | test "calling an inferred async function" { | 102 | test "calling an inferred async function" { |
| | 103 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 104 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 105 | |
| 91 | const S = struct { | 106 | const S = struct { |
| 92 | var x: i32 = 1; | 107 | var x: i32 = 1; |
| 93 | var other_frame: *@Frame(other) = undefined; | 108 | var other_frame: *@Frame(other) = undefined; |
| ... | @@ -112,6 +127,9 @@ test "calling an inferred async function" { | ... | @@ -112,6 +127,9 @@ test "calling an inferred async function" { |
| 112 | } | 127 | } |
| 113 | | 128 | |
| 114 | test "@frameSize" { | 129 | test "@frameSize" { |
| | 130 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 131 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 132 | |
| 115 | if (builtin.target.cpu.arch == .thumb or builtin.target.cpu.arch == .thumbeb) | 133 | if (builtin.target.cpu.arch == .thumb or builtin.target.cpu.arch == .thumbeb) |
| 116 | return error.SkipZigTest; | 134 | return error.SkipZigTest; |
| 117 | | 135 | |
| ... | @@ -143,6 +161,9 @@ test "@frameSize" { | ... | @@ -143,6 +161,9 @@ test "@frameSize" { |
| 143 | } | 161 | } |
| 144 | | 162 | |
| 145 | test "coroutine suspend, resume" { | 163 | test "coroutine suspend, resume" { |
| | 164 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 165 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 166 | |
| 146 | const S = struct { | 167 | const S = struct { |
| 147 | var frame: anyframe = undefined; | 168 | var frame: anyframe = undefined; |
| 148 | | 169 | |
| ... | @@ -184,6 +205,9 @@ test "coroutine suspend, resume" { | ... | @@ -184,6 +205,9 @@ test "coroutine suspend, resume" { |
| 184 | } | 205 | } |
| 185 | | 206 | |
| 186 | test "coroutine suspend with block" { | 207 | test "coroutine suspend with block" { |
| | 208 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 209 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 210 | |
| 187 | const p = async testSuspendBlock(); | 211 | const p = async testSuspendBlock(); |
| 188 | _ = p; | 212 | _ = p; |
| 189 | try expect(!global_result); | 213 | try expect(!global_result); |
| ... | @@ -210,6 +234,9 @@ var await_a_promise: anyframe = undefined; | ... | @@ -210,6 +234,9 @@ var await_a_promise: anyframe = undefined; |
| 210 | var await_final_result: i32 = 0; | 234 | var await_final_result: i32 = 0; |
| 211 | | 235 | |
| 212 | test "coroutine await" { | 236 | test "coroutine await" { |
| | 237 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 238 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 239 | |
| 213 | await_seq('a'); | 240 | await_seq('a'); |
| 214 | var p = async await_amain(); | 241 | var p = async await_amain(); |
| 215 | _ = p; | 242 | _ = p; |
| ... | @@ -247,6 +274,9 @@ fn await_seq(c: u8) void { | ... | @@ -247,6 +274,9 @@ fn await_seq(c: u8) void { |
| 247 | var early_final_result: i32 = 0; | 274 | var early_final_result: i32 = 0; |
| 248 | | 275 | |
| 249 | test "coroutine await early return" { | 276 | test "coroutine await early return" { |
| | 277 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 278 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 279 | |
| 250 | early_seq('a'); | 280 | early_seq('a'); |
| 251 | var p = async early_amain(); | 281 | var p = async early_amain(); |
| 252 | _ = p; | 282 | _ = p; |
| ... | @@ -275,6 +305,9 @@ fn early_seq(c: u8) void { | ... | @@ -275,6 +305,9 @@ fn early_seq(c: u8) void { |
| 275 | } | 305 | } |
| 276 | | 306 | |
| 277 | test "async function with dot syntax" { | 307 | test "async function with dot syntax" { |
| | 308 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 309 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 310 | |
| 278 | const S = struct { | 311 | const S = struct { |
| 279 | var y: i32 = 1; | 312 | var y: i32 = 1; |
| 280 | fn foo() callconv(.Async) void { | 313 | fn foo() callconv(.Async) void { |
| ... | @@ -288,6 +321,9 @@ test "async function with dot syntax" { | ... | @@ -288,6 +321,9 @@ test "async function with dot syntax" { |
| 288 | } | 321 | } |
| 289 | | 322 | |
| 290 | test "async fn pointer in a struct field" { | 323 | test "async fn pointer in a struct field" { |
| | 324 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 325 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 326 | |
| 291 | var data: i32 = 1; | 327 | var data: i32 = 1; |
| 292 | const Foo = struct { | 328 | const Foo = struct { |
| 293 | bar: fn (*i32) callconv(.Async) void, | 329 | bar: fn (*i32) callconv(.Async) void, |
| ... | @@ -313,6 +349,9 @@ fn simpleAsyncFn2(y: *i32) callconv(.Async) void { | ... | @@ -313,6 +349,9 @@ fn simpleAsyncFn2(y: *i32) callconv(.Async) void { |
| 313 | } | 349 | } |
| 314 | | 350 | |
| 315 | test "@asyncCall with return type" { | 351 | test "@asyncCall with return type" { |
| | 352 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 353 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 354 | |
| 316 | const Foo = struct { | 355 | const Foo = struct { |
| 317 | bar: fn () callconv(.Async) i32, | 356 | bar: fn () callconv(.Async) i32, |
| 318 | | 357 | |
| ... | @@ -337,6 +376,9 @@ test "@asyncCall with return type" { | ... | @@ -337,6 +376,9 @@ test "@asyncCall with return type" { |
| 337 | } | 376 | } |
| 338 | | 377 | |
| 339 | test "async fn with inferred error set" { | 378 | test "async fn with inferred error set" { |
| | 379 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 380 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 381 | |
| 340 | const S = struct { | 382 | const S = struct { |
| 341 | var global_frame: anyframe = undefined; | 383 | var global_frame: anyframe = undefined; |
| 342 | | 384 | |
| ... | @@ -367,6 +409,9 @@ test "async fn with inferred error set" { | ... | @@ -367,6 +409,9 @@ test "async fn with inferred error set" { |
| 367 | } | 409 | } |
| 368 | | 410 | |
| 369 | test "error return trace across suspend points - early return" { | 411 | test "error return trace across suspend points - early return" { |
| | 412 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 413 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 414 | |
| 370 | const p = nonFailing(); | 415 | const p = nonFailing(); |
| 371 | resume p; | 416 | resume p; |
| 372 | const p2 = async printTrace(p); | 417 | const p2 = async printTrace(p); |
| ... | @@ -374,6 +419,9 @@ test "error return trace across suspend points - early return" { | ... | @@ -374,6 +419,9 @@ test "error return trace across suspend points - early return" { |
| 374 | } | 419 | } |
| 375 | | 420 | |
| 376 | test "error return trace across suspend points - async return" { | 421 | test "error return trace across suspend points - async return" { |
| | 422 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 423 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 424 | |
| 377 | const p = nonFailing(); | 425 | const p = nonFailing(); |
| 378 | const p2 = async printTrace(p); | 426 | const p2 = async printTrace(p); |
| 379 | _ = p2; | 427 | _ = p2; |
| ... | @@ -404,6 +452,9 @@ fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { | ... | @@ -404,6 +452,9 @@ fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { |
| 404 | } | 452 | } |
| 405 | | 453 | |
| 406 | test "break from suspend" { | 454 | test "break from suspend" { |
| | 455 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 456 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 457 | |
| 407 | var my_result: i32 = 1; | 458 | var my_result: i32 = 1; |
| 408 | const p = async testBreakFromSuspend(&my_result); | 459 | const p = async testBreakFromSuspend(&my_result); |
| 409 | _ = p; | 460 | _ = p; |
| ... | @@ -419,6 +470,9 @@ fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { | ... | @@ -419,6 +470,9 @@ fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { |
| 419 | } | 470 | } |
| 420 | | 471 | |
| 421 | test "heap allocated async function frame" { | 472 | test "heap allocated async function frame" { |
| | 473 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 474 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 475 | |
| 422 | const S = struct { | 476 | const S = struct { |
| 423 | var x: i32 = 42; | 477 | var x: i32 = 42; |
| 424 | | 478 | |
| ... | @@ -443,6 +497,9 @@ test "heap allocated async function frame" { | ... | @@ -443,6 +497,9 @@ test "heap allocated async function frame" { |
| 443 | } | 497 | } |
| 444 | | 498 | |
| 445 | test "async function call return value" { | 499 | test "async function call return value" { |
| | 500 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 501 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 502 | |
| 446 | const S = struct { | 503 | const S = struct { |
| 447 | var frame: anyframe = undefined; | 504 | var frame: anyframe = undefined; |
| 448 | var pt = Point{ .x = 10, .y = 11 }; | 505 | var pt = Point{ .x = 10, .y = 11 }; |
| ... | @@ -484,6 +541,9 @@ test "async function call return value" { | ... | @@ -484,6 +541,9 @@ test "async function call return value" { |
| 484 | } | 541 | } |
| 485 | | 542 | |
| 486 | test "suspension points inside branching control flow" { | 543 | test "suspension points inside branching control flow" { |
| | 544 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 545 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 546 | |
| 487 | const S = struct { | 547 | const S = struct { |
| 488 | var result: i32 = 10; | 548 | var result: i32 = 10; |
| 489 | | 549 | |
| ... | @@ -510,6 +570,9 @@ test "suspension points inside branching control flow" { | ... | @@ -510,6 +570,9 @@ test "suspension points inside branching control flow" { |
| 510 | } | 570 | } |
| 511 | | 571 | |
| 512 | test "call async function which has struct return type" { | 572 | test "call async function which has struct return type" { |
| | 573 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 574 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 575 | |
| 513 | const S = struct { | 576 | const S = struct { |
| 514 | var frame: anyframe = undefined; | 577 | var frame: anyframe = undefined; |
| 515 | | 578 | |
| ... | @@ -543,6 +606,9 @@ test "call async function which has struct return type" { | ... | @@ -543,6 +606,9 @@ test "call async function which has struct return type" { |
| 543 | } | 606 | } |
| 544 | | 607 | |
| 545 | test "pass string literal to async function" { | 608 | test "pass string literal to async function" { |
| | 609 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 610 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 611 | |
| 546 | const S = struct { | 612 | const S = struct { |
| 547 | var frame: anyframe = undefined; | 613 | var frame: anyframe = undefined; |
| 548 | var ok: bool = false; | 614 | var ok: bool = false; |
| ... | @@ -564,6 +630,9 @@ test "pass string literal to async function" { | ... | @@ -564,6 +630,9 @@ test "pass string literal to async function" { |
| 564 | } | 630 | } |
| 565 | | 631 | |
| 566 | test "await inside an errdefer" { | 632 | test "await inside an errdefer" { |
| | 633 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 634 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 635 | |
| 567 | const S = struct { | 636 | const S = struct { |
| 568 | var frame: anyframe = undefined; | 637 | var frame: anyframe = undefined; |
| 569 | | 638 | |
| ... | @@ -587,6 +656,9 @@ test "await inside an errdefer" { | ... | @@ -587,6 +656,9 @@ test "await inside an errdefer" { |
| 587 | } | 656 | } |
| 588 | | 657 | |
| 589 | test "try in an async function with error union and non-zero-bit payload" { | 658 | test "try in an async function with error union and non-zero-bit payload" { |
| | 659 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 660 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 661 | |
| 590 | const S = struct { | 662 | const S = struct { |
| 591 | var frame: anyframe = undefined; | 663 | var frame: anyframe = undefined; |
| 592 | var ok = false; | 664 | var ok = false; |
| ... | @@ -617,6 +689,9 @@ test "try in an async function with error union and non-zero-bit payload" { | ... | @@ -617,6 +689,9 @@ test "try in an async function with error union and non-zero-bit payload" { |
| 617 | } | 689 | } |
| 618 | | 690 | |
| 619 | test "returning a const error from async function" { | 691 | test "returning a const error from async function" { |
| | 692 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 693 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 694 | |
| 620 | const S = struct { | 695 | const S = struct { |
| 621 | var frame: anyframe = undefined; | 696 | var frame: anyframe = undefined; |
| 622 | var ok = false; | 697 | var ok = false; |
| ... | @@ -648,6 +723,9 @@ test "returning a const error from async function" { | ... | @@ -648,6 +723,9 @@ test "returning a const error from async function" { |
| 648 | } | 723 | } |
| 649 | | 724 | |
| 650 | test "async/await typical usage" { | 725 | test "async/await typical usage" { |
| | 726 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 727 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 728 | |
| 651 | inline for ([_]bool{ false, true }) |b1| { | 729 | inline for ([_]bool{ false, true }) |b1| { |
| 652 | inline for ([_]bool{ false, true }) |b2| { | 730 | inline for ([_]bool{ false, true }) |b2| { |
| 653 | inline for ([_]bool{ false, true }) |b3| { | 731 | inline for ([_]bool{ false, true }) |b3| { |
| ... | @@ -743,6 +821,9 @@ fn testAsyncAwaitTypicalUsage( | ... | @@ -743,6 +821,9 @@ fn testAsyncAwaitTypicalUsage( |
| 743 | } | 821 | } |
| 744 | | 822 | |
| 745 | test "alignment of local variables in async functions" { | 823 | test "alignment of local variables in async functions" { |
| | 824 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 825 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 826 | |
| 746 | const S = struct { | 827 | const S = struct { |
| 747 | fn doTheTest() !void { | 828 | fn doTheTest() !void { |
| 748 | var y: u8 = 123; | 829 | var y: u8 = 123; |
| ... | @@ -755,6 +836,9 @@ test "alignment of local variables in async functions" { | ... | @@ -755,6 +836,9 @@ test "alignment of local variables in async functions" { |
| 755 | } | 836 | } |
| 756 | | 837 | |
| 757 | test "no reason to resolve frame still works" { | 838 | test "no reason to resolve frame still works" { |
| | 839 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 840 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 841 | |
| 758 | _ = async simpleNothing(); | 842 | _ = async simpleNothing(); |
| 759 | } | 843 | } |
| 760 | fn simpleNothing() void { | 844 | fn simpleNothing() void { |
| ... | @@ -763,6 +847,9 @@ fn simpleNothing() void { | ... | @@ -763,6 +847,9 @@ fn simpleNothing() void { |
| 763 | } | 847 | } |
| 764 | | 848 | |
| 765 | test "async call a generic function" { | 849 | test "async call a generic function" { |
| | 850 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 851 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 852 | |
| 766 | const S = struct { | 853 | const S = struct { |
| 767 | fn doTheTest() !void { | 854 | fn doTheTest() !void { |
| 768 | var f = async func(i32, 2); | 855 | var f = async func(i32, 2); |
| ... | @@ -783,6 +870,9 @@ test "async call a generic function" { | ... | @@ -783,6 +870,9 @@ test "async call a generic function" { |
| 783 | } | 870 | } |
| 784 | | 871 | |
| 785 | test "return from suspend block" { | 872 | test "return from suspend block" { |
| | 873 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 874 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 875 | |
| 786 | const S = struct { | 876 | const S = struct { |
| 787 | fn doTheTest() !void { | 877 | fn doTheTest() !void { |
| 788 | expect(func() == 1234) catch @panic("test failure"); | 878 | expect(func() == 1234) catch @panic("test failure"); |
| ... | @@ -797,6 +887,9 @@ test "return from suspend block" { | ... | @@ -797,6 +887,9 @@ test "return from suspend block" { |
| 797 | } | 887 | } |
| 798 | | 888 | |
| 799 | test "struct parameter to async function is copied to the frame" { | 889 | test "struct parameter to async function is copied to the frame" { |
| | 890 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 891 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 892 | |
| 800 | const S = struct { | 893 | const S = struct { |
| 801 | const Point = struct { | 894 | const Point = struct { |
| 802 | x: i32, | 895 | x: i32, |
| ... | @@ -841,6 +934,9 @@ test "struct parameter to async function is copied to the frame" { | ... | @@ -841,6 +934,9 @@ test "struct parameter to async function is copied to the frame" { |
| 841 | } | 934 | } |
| 842 | | 935 | |
| 843 | test "cast fn to async fn when it is inferred to be async" { | 936 | test "cast fn to async fn when it is inferred to be async" { |
| | 937 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 938 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 939 | |
| 844 | const S = struct { | 940 | const S = struct { |
| 845 | var frame: anyframe = undefined; | 941 | var frame: anyframe = undefined; |
| 846 | var ok = false; | 942 | var ok = false; |
| ... | @@ -869,6 +965,9 @@ test "cast fn to async fn when it is inferred to be async" { | ... | @@ -869,6 +965,9 @@ test "cast fn to async fn when it is inferred to be async" { |
| 869 | } | 965 | } |
| 870 | | 966 | |
| 871 | test "cast fn to async fn when it is inferred to be async, awaited directly" { | 967 | test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| | 968 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 969 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 970 | |
| 872 | const S = struct { | 971 | const S = struct { |
| 873 | var frame: anyframe = undefined; | 972 | var frame: anyframe = undefined; |
| 874 | var ok = false; | 973 | var ok = false; |
| ... | @@ -896,6 +995,9 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { | ... | @@ -896,6 +995,9 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 896 | } | 995 | } |
| 897 | | 996 | |
| 898 | test "await does not force async if callee is blocking" { | 997 | test "await does not force async if callee is blocking" { |
| | 998 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 999 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1000 | |
| 899 | const S = struct { | 1001 | const S = struct { |
| 900 | fn simple() i32 { | 1002 | fn simple() i32 { |
| 901 | return 1234; | 1003 | return 1234; |
| ... | @@ -906,6 +1008,9 @@ test "await does not force async if callee is blocking" { | ... | @@ -906,6 +1008,9 @@ test "await does not force async if callee is blocking" { |
| 906 | } | 1008 | } |
| 907 | | 1009 | |
| 908 | test "recursive async function" { | 1010 | test "recursive async function" { |
| | 1011 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1012 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1013 | |
| 909 | try expect(recursiveAsyncFunctionTest(false).doTheTest() == 55); | 1014 | try expect(recursiveAsyncFunctionTest(false).doTheTest() == 55); |
| 910 | try expect(recursiveAsyncFunctionTest(true).doTheTest() == 55); | 1015 | try expect(recursiveAsyncFunctionTest(true).doTheTest() == 55); |
| 911 | } | 1016 | } |
| ... | @@ -968,6 +1073,9 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { | ... | @@ -968,6 +1073,9 @@ fn recursiveAsyncFunctionTest(comptime suspending_implementation: bool) type { |
| 968 | } | 1073 | } |
| 969 | | 1074 | |
| 970 | test "@asyncCall with comptime-known function, but not awaited directly" { | 1075 | test "@asyncCall with comptime-known function, but not awaited directly" { |
| | 1076 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1077 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1078 | |
| 971 | const S = struct { | 1079 | const S = struct { |
| 972 | var global_frame: anyframe = undefined; | 1080 | var global_frame: anyframe = undefined; |
| 973 | | 1081 | |
| ... | @@ -997,6 +1105,9 @@ test "@asyncCall with comptime-known function, but not awaited directly" { | ... | @@ -997,6 +1105,9 @@ test "@asyncCall with comptime-known function, but not awaited directly" { |
| 997 | } | 1105 | } |
| 998 | | 1106 | |
| 999 | test "@asyncCall with actual frame instead of byte buffer" { | 1107 | test "@asyncCall with actual frame instead of byte buffer" { |
| | 1108 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1109 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1110 | |
| 1000 | const S = struct { | 1111 | const S = struct { |
| 1001 | fn func() i32 { | 1112 | fn func() i32 { |
| 1002 | suspend {} | 1113 | suspend {} |
| ... | @@ -1011,6 +1122,9 @@ test "@asyncCall with actual frame instead of byte buffer" { | ... | @@ -1011,6 +1122,9 @@ test "@asyncCall with actual frame instead of byte buffer" { |
| 1011 | } | 1122 | } |
| 1012 | | 1123 | |
| 1013 | test "@asyncCall using the result location inside the frame" { | 1124 | test "@asyncCall using the result location inside the frame" { |
| | 1125 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1126 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1127 | |
| 1014 | const S = struct { | 1128 | const S = struct { |
| 1015 | fn simple2(y: *i32) callconv(.Async) i32 { | 1129 | fn simple2(y: *i32) callconv(.Async) i32 { |
| 1016 | defer y.* += 2; | 1130 | defer y.* += 2; |
| ... | @@ -1038,6 +1152,9 @@ test "@asyncCall using the result location inside the frame" { | ... | @@ -1038,6 +1152,9 @@ test "@asyncCall using the result location inside the frame" { |
| 1038 | } | 1152 | } |
| 1039 | | 1153 | |
| 1040 | test "@TypeOf an async function call of generic fn with error union type" { | 1154 | test "@TypeOf an async function call of generic fn with error union type" { |
| | 1155 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1156 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1157 | |
| 1041 | const S = struct { | 1158 | const S = struct { |
| 1042 | fn func(comptime x: anytype) anyerror!i32 { | 1159 | fn func(comptime x: anytype) anyerror!i32 { |
| 1043 | const T = @TypeOf(async func(x)); | 1160 | const T = @TypeOf(async func(x)); |
| ... | @@ -1049,6 +1166,9 @@ test "@TypeOf an async function call of generic fn with error union type" { | ... | @@ -1049,6 +1166,9 @@ test "@TypeOf an async function call of generic fn with error union type" { |
| 1049 | } | 1166 | } |
| 1050 | | 1167 | |
| 1051 | test "using @TypeOf on a generic function call" { | 1168 | test "using @TypeOf on a generic function call" { |
| | 1169 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1170 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1171 | |
| 1052 | const S = struct { | 1172 | const S = struct { |
| 1053 | var global_frame: anyframe = undefined; | 1173 | var global_frame: anyframe = undefined; |
| 1054 | var global_ok = false; | 1174 | var global_ok = false; |
| ... | @@ -1074,6 +1194,9 @@ test "using @TypeOf on a generic function call" { | ... | @@ -1074,6 +1194,9 @@ test "using @TypeOf on a generic function call" { |
| 1074 | } | 1194 | } |
| 1075 | | 1195 | |
| 1076 | test "recursive call of await @asyncCall with struct return type" { | 1196 | test "recursive call of await @asyncCall with struct return type" { |
| | 1197 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1198 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1199 | |
| 1077 | const S = struct { | 1200 | const S = struct { |
| 1078 | var global_frame: anyframe = undefined; | 1201 | var global_frame: anyframe = undefined; |
| 1079 | var global_ok = false; | 1202 | var global_ok = false; |
| ... | @@ -1110,6 +1233,9 @@ test "recursive call of await @asyncCall with struct return type" { | ... | @@ -1110,6 +1233,9 @@ test "recursive call of await @asyncCall with struct return type" { |
| 1110 | } | 1233 | } |
| 1111 | | 1234 | |
| 1112 | test "nosuspend function call" { | 1235 | test "nosuspend function call" { |
| | 1236 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1237 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1238 | |
| 1113 | const S = struct { | 1239 | const S = struct { |
| 1114 | fn doTheTest() !void { | 1240 | fn doTheTest() !void { |
| 1115 | const result = nosuspend add(50, 100); | 1241 | const result = nosuspend add(50, 100); |
| ... | @@ -1126,6 +1252,9 @@ test "nosuspend function call" { | ... | @@ -1126,6 +1252,9 @@ test "nosuspend function call" { |
| 1126 | } | 1252 | } |
| 1127 | | 1253 | |
| 1128 | test "await used in expression and awaiting fn with no suspend but async calling convention" { | 1254 | test "await used in expression and awaiting fn with no suspend but async calling convention" { |
| | 1255 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1256 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1257 | |
| 1129 | const S = struct { | 1258 | const S = struct { |
| 1130 | fn atest() void { | 1259 | fn atest() void { |
| 1131 | var f1 = async add(1, 2); | 1260 | var f1 = async add(1, 2); |
| ... | @@ -1142,6 +1271,9 @@ test "await used in expression and awaiting fn with no suspend but async calling | ... | @@ -1142,6 +1271,9 @@ test "await used in expression and awaiting fn with no suspend but async calling |
| 1142 | } | 1271 | } |
| 1143 | | 1272 | |
| 1144 | test "await used in expression after a fn call" { | 1273 | test "await used in expression after a fn call" { |
| | 1274 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1275 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1276 | |
| 1145 | const S = struct { | 1277 | const S = struct { |
| 1146 | fn atest() void { | 1278 | fn atest() void { |
| 1147 | var f1 = async add(3, 4); | 1279 | var f1 = async add(3, 4); |
| ... | @@ -1160,6 +1292,9 @@ test "await used in expression after a fn call" { | ... | @@ -1160,6 +1292,9 @@ test "await used in expression after a fn call" { |
| 1160 | } | 1292 | } |
| 1161 | | 1293 | |
| 1162 | test "async fn call used in expression after a fn call" { | 1294 | test "async fn call used in expression after a fn call" { |
| | 1295 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1296 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1297 | |
| 1163 | const S = struct { | 1298 | const S = struct { |
| 1164 | fn atest() void { | 1299 | fn atest() void { |
| 1165 | var sum: i32 = 0; | 1300 | var sum: i32 = 0; |
| ... | @@ -1177,6 +1312,9 @@ test "async fn call used in expression after a fn call" { | ... | @@ -1177,6 +1312,9 @@ test "async fn call used in expression after a fn call" { |
| 1177 | } | 1312 | } |
| 1178 | | 1313 | |
| 1179 | test "suspend in for loop" { | 1314 | test "suspend in for loop" { |
| | 1315 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1316 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1317 | |
| 1180 | const S = struct { | 1318 | const S = struct { |
| 1181 | var global_frame: ?anyframe = null; | 1319 | var global_frame: ?anyframe = null; |
| 1182 | | 1320 | |
| ... | @@ -1203,6 +1341,9 @@ test "suspend in for loop" { | ... | @@ -1203,6 +1341,9 @@ test "suspend in for loop" { |
| 1203 | } | 1341 | } |
| 1204 | | 1342 | |
| 1205 | test "suspend in while loop" { | 1343 | test "suspend in while loop" { |
| | 1344 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1345 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1346 | |
| 1206 | const S = struct { | 1347 | const S = struct { |
| 1207 | var global_frame: ?anyframe = null; | 1348 | var global_frame: ?anyframe = null; |
| 1208 | | 1349 | |
| ... | @@ -1240,6 +1381,9 @@ test "suspend in while loop" { | ... | @@ -1240,6 +1381,9 @@ test "suspend in while loop" { |
| 1240 | } | 1381 | } |
| 1241 | | 1382 | |
| 1242 | test "correctly spill when returning the error union result of another async fn" { | 1383 | test "correctly spill when returning the error union result of another async fn" { |
| | 1384 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1385 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1386 | |
| 1243 | const S = struct { | 1387 | const S = struct { |
| 1244 | var global_frame: anyframe = undefined; | 1388 | var global_frame: anyframe = undefined; |
| 1245 | | 1389 | |
| ... | @@ -1263,6 +1407,9 @@ test "correctly spill when returning the error union result of another async fn" | ... | @@ -1263,6 +1407,9 @@ test "correctly spill when returning the error union result of another async fn" |
| 1263 | } | 1407 | } |
| 1264 | | 1408 | |
| 1265 | test "spill target expr in a for loop" { | 1409 | test "spill target expr in a for loop" { |
| | 1410 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1411 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1412 | |
| 1266 | const S = struct { | 1413 | const S = struct { |
| 1267 | var global_frame: anyframe = undefined; | 1414 | var global_frame: anyframe = undefined; |
| 1268 | | 1415 | |
| ... | @@ -1294,6 +1441,9 @@ test "spill target expr in a for loop" { | ... | @@ -1294,6 +1441,9 @@ test "spill target expr in a for loop" { |
| 1294 | } | 1441 | } |
| 1295 | | 1442 | |
| 1296 | test "spill target expr in a for loop, with a var decl in the loop body" { | 1443 | test "spill target expr in a for loop, with a var decl in the loop body" { |
| | 1444 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1445 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1446 | |
| 1297 | const S = struct { | 1447 | const S = struct { |
| 1298 | var global_frame: anyframe = undefined; | 1448 | var global_frame: anyframe = undefined; |
| 1299 | | 1449 | |
| ... | @@ -1330,6 +1480,9 @@ test "spill target expr in a for loop, with a var decl in the loop body" { | ... | @@ -1330,6 +1480,9 @@ test "spill target expr in a for loop, with a var decl in the loop body" { |
| 1330 | } | 1480 | } |
| 1331 | | 1481 | |
| 1332 | test "async call with @call" { | 1482 | test "async call with @call" { |
| | 1483 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1484 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1485 | |
| 1333 | const S = struct { | 1486 | const S = struct { |
| 1334 | var global_frame: anyframe = undefined; | 1487 | var global_frame: anyframe = undefined; |
| 1335 | fn doTheTest() void { | 1488 | fn doTheTest() void { |
| ... | @@ -1352,6 +1505,9 @@ test "async call with @call" { | ... | @@ -1352,6 +1505,9 @@ test "async call with @call" { |
| 1352 | } | 1505 | } |
| 1353 | | 1506 | |
| 1354 | test "async function passed 0-bit arg after non-0-bit arg" { | 1507 | test "async function passed 0-bit arg after non-0-bit arg" { |
| | 1508 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1509 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1510 | |
| 1355 | const S = struct { | 1511 | const S = struct { |
| 1356 | var global_frame: anyframe = undefined; | 1512 | var global_frame: anyframe = undefined; |
| 1357 | var global_int: i32 = 0; | 1513 | var global_int: i32 = 0; |
| ... | @@ -1373,6 +1529,9 @@ test "async function passed 0-bit arg after non-0-bit arg" { | ... | @@ -1373,6 +1529,9 @@ test "async function passed 0-bit arg after non-0-bit arg" { |
| 1373 | } | 1529 | } |
| 1374 | | 1530 | |
| 1375 | test "async function passed align(16) arg after align(8) arg" { | 1531 | test "async function passed align(16) arg after align(8) arg" { |
| | 1532 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1533 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1534 | |
| 1376 | const S = struct { | 1535 | const S = struct { |
| 1377 | var global_frame: anyframe = undefined; | 1536 | var global_frame: anyframe = undefined; |
| 1378 | var global_int: u128 = 0; | 1537 | var global_int: u128 = 0; |
| ... | @@ -1395,6 +1554,9 @@ test "async function passed align(16) arg after align(8) arg" { | ... | @@ -1395,6 +1554,9 @@ test "async function passed align(16) arg after align(8) arg" { |
| 1395 | } | 1554 | } |
| 1396 | | 1555 | |
| 1397 | test "async function call resolves target fn frame, comptime func" { | 1556 | test "async function call resolves target fn frame, comptime func" { |
| | 1557 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1558 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1559 | |
| 1398 | const S = struct { | 1560 | const S = struct { |
| 1399 | var global_frame: anyframe = undefined; | 1561 | var global_frame: anyframe = undefined; |
| 1400 | var global_int: i32 = 9; | 1562 | var global_int: i32 = 9; |
| ... | @@ -1417,6 +1579,9 @@ test "async function call resolves target fn frame, comptime func" { | ... | @@ -1417,6 +1579,9 @@ test "async function call resolves target fn frame, comptime func" { |
| 1417 | } | 1579 | } |
| 1418 | | 1580 | |
| 1419 | test "async function call resolves target fn frame, runtime func" { | 1581 | test "async function call resolves target fn frame, runtime func" { |
| | 1582 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1583 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1584 | |
| 1420 | const S = struct { | 1585 | const S = struct { |
| 1421 | var global_frame: anyframe = undefined; | 1586 | var global_frame: anyframe = undefined; |
| 1422 | var global_int: i32 = 9; | 1587 | var global_int: i32 = 9; |
| ... | @@ -1440,6 +1605,9 @@ test "async function call resolves target fn frame, runtime func" { | ... | @@ -1440,6 +1605,9 @@ test "async function call resolves target fn frame, runtime func" { |
| 1440 | } | 1605 | } |
| 1441 | | 1606 | |
| 1442 | test "properly spill optional payload capture value" { | 1607 | test "properly spill optional payload capture value" { |
| | 1608 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1609 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1610 | |
| 1443 | const S = struct { | 1611 | const S = struct { |
| 1444 | var global_frame: anyframe = undefined; | 1612 | var global_frame: anyframe = undefined; |
| 1445 | var global_int: usize = 2; | 1613 | var global_int: usize = 2; |
| ... | @@ -1464,6 +1632,9 @@ test "properly spill optional payload capture value" { | ... | @@ -1464,6 +1632,9 @@ test "properly spill optional payload capture value" { |
| 1464 | } | 1632 | } |
| 1465 | | 1633 | |
| 1466 | test "handle defer interfering with return value spill" { | 1634 | test "handle defer interfering with return value spill" { |
| | 1635 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1636 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1637 | |
| 1467 | const S = struct { | 1638 | const S = struct { |
| 1468 | var global_frame1: anyframe = undefined; | 1639 | var global_frame1: anyframe = undefined; |
| 1469 | var global_frame2: anyframe = undefined; | 1640 | var global_frame2: anyframe = undefined; |
| ... | @@ -1504,6 +1675,9 @@ test "handle defer interfering with return value spill" { | ... | @@ -1504,6 +1675,9 @@ test "handle defer interfering with return value spill" { |
| 1504 | } | 1675 | } |
| 1505 | | 1676 | |
| 1506 | test "take address of temporary async frame" { | 1677 | test "take address of temporary async frame" { |
| | 1678 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1679 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1680 | |
| 1507 | const S = struct { | 1681 | const S = struct { |
| 1508 | var global_frame: anyframe = undefined; | 1682 | var global_frame: anyframe = undefined; |
| 1509 | var finished = false; | 1683 | var finished = false; |
| ... | @@ -1533,6 +1707,9 @@ test "take address of temporary async frame" { | ... | @@ -1533,6 +1707,9 @@ test "take address of temporary async frame" { |
| 1533 | } | 1707 | } |
| 1534 | | 1708 | |
| 1535 | test "nosuspend await" { | 1709 | test "nosuspend await" { |
| | 1710 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1711 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1712 | |
| 1536 | const S = struct { | 1713 | const S = struct { |
| 1537 | var finished = false; | 1714 | var finished = false; |
| 1538 | | 1715 | |
| ... | @@ -1554,6 +1731,9 @@ test "nosuspend await" { | ... | @@ -1554,6 +1731,9 @@ test "nosuspend await" { |
| 1554 | } | 1731 | } |
| 1555 | | 1732 | |
| 1556 | test "nosuspend on function calls" { | 1733 | test "nosuspend on function calls" { |
| | 1734 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1735 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1736 | |
| 1557 | const S0 = struct { | 1737 | const S0 = struct { |
| 1558 | b: i32 = 42, | 1738 | b: i32 = 42, |
| 1559 | }; | 1739 | }; |
| ... | @@ -1570,6 +1750,9 @@ test "nosuspend on function calls" { | ... | @@ -1570,6 +1750,9 @@ test "nosuspend on function calls" { |
| 1570 | } | 1750 | } |
| 1571 | | 1751 | |
| 1572 | test "nosuspend on async function calls" { | 1752 | test "nosuspend on async function calls" { |
| | 1753 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1754 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1755 | |
| 1573 | const S0 = struct { | 1756 | const S0 = struct { |
| 1574 | b: i32 = 42, | 1757 | b: i32 = 42, |
| 1575 | }; | 1758 | }; |
| ... | @@ -1588,6 +1771,7 @@ test "nosuspend on async function calls" { | ... | @@ -1588,6 +1771,7 @@ test "nosuspend on async function calls" { |
| 1588 | } | 1771 | } |
| 1589 | | 1772 | |
| 1590 | // test "resume nosuspend async function calls" { | 1773 | // test "resume nosuspend async function calls" { |
| | 1774 | // if (builtin.zig_backend != .stage1) return error.SkipZigTest; // if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1591 | // const S0 = struct { | 1775 | // const S0 = struct { |
| 1592 | // b: i32 = 42, | 1776 | // b: i32 = 42, |
| 1593 | // }; | 1777 | // }; |
| ... | @@ -1610,6 +1794,9 @@ test "nosuspend on async function calls" { | ... | @@ -1610,6 +1794,9 @@ test "nosuspend on async function calls" { |
| 1610 | // } | 1794 | // } |
| 1611 | | 1795 | |
| 1612 | test "nosuspend resume async function calls" { | 1796 | test "nosuspend resume async function calls" { |
| | 1797 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1798 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1799 | |
| 1613 | const S0 = struct { | 1800 | const S0 = struct { |
| 1614 | b: i32 = 42, | 1801 | b: i32 = 42, |
| 1615 | }; | 1802 | }; |
| ... | @@ -1632,6 +1819,9 @@ test "nosuspend resume async function calls" { | ... | @@ -1632,6 +1819,9 @@ test "nosuspend resume async function calls" { |
| 1632 | } | 1819 | } |
| 1633 | | 1820 | |
| 1634 | test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { | 1821 | test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| | 1822 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1823 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1824 | |
| 1635 | const S = struct { | 1825 | const S = struct { |
| 1636 | var x: ?*anyopaque = null; | 1826 | var x: ?*anyopaque = null; |
| 1637 | | 1827 | |
| ... | @@ -1648,6 +1838,9 @@ test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { | ... | @@ -1648,6 +1838,9 @@ test "avoid forcing frame alignment resolution implicit cast to *anyopaque" { |
| 1648 | } | 1838 | } |
| 1649 | | 1839 | |
| 1650 | test "@asyncCall with pass-by-value arguments" { | 1840 | test "@asyncCall with pass-by-value arguments" { |
| | 1841 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1842 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1843 | |
| 1651 | const F0: u64 = 0xbeefbeefbeefbeef; | 1844 | const F0: u64 = 0xbeefbeefbeefbeef; |
| 1652 | const F1: u64 = 0xf00df00df00df00d; | 1845 | const F1: u64 = 0xf00df00df00df00d; |
| 1653 | const F2: u64 = 0xcafecafecafecafe; | 1846 | const F2: u64 = 0xcafecafecafecafe; |
| ... | @@ -1681,6 +1874,9 @@ test "@asyncCall with pass-by-value arguments" { | ... | @@ -1681,6 +1874,9 @@ test "@asyncCall with pass-by-value arguments" { |
| 1681 | } | 1874 | } |
| 1682 | | 1875 | |
| 1683 | test "@asyncCall with arguments having non-standard alignment" { | 1876 | test "@asyncCall with arguments having non-standard alignment" { |
| | 1877 | if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO |
| | 1878 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| | 1879 | |
| 1684 | const F0: u64 = 0xbeefbeef; | 1880 | const F0: u64 = 0xbeefbeef; |
| 1685 | const F1: u64 = 0xf00df00df00df00d; | 1881 | const F1: u64 = 0xf00df00df00df00d; |
| 1686 | | 1882 | |