| ... | @@ -111,12 +111,12 @@ test "@frameSize" { | ... | @@ -111,12 +111,12 @@ test "@frameSize" { |
| 111 | const S = struct { | 111 | const S = struct { |
| 112 | fn doTheTest() void { | 112 | fn doTheTest() void { |
| 113 | { | 113 | { |
| 114 | var ptr = @ptrCast(async fn(i32) void, other); | 114 | var ptr = @ptrCast(async fn (i32) void, other); |
| 115 | const size = @frameSize(ptr); | 115 | const size = @frameSize(ptr); |
| 116 | expect(size == @sizeOf(@Frame(other))); | 116 | expect(size == @sizeOf(@Frame(other))); |
| 117 | } | 117 | } |
| 118 | { | 118 | { |
| 119 | var ptr = @ptrCast(async fn() void, first); | 119 | var ptr = @ptrCast(async fn () void, first); |
| 120 | const size = @frameSize(ptr); | 120 | const size = @frameSize(ptr); |
| 121 | expect(size == @sizeOf(@Frame(first))); | 121 | expect(size == @sizeOf(@Frame(first))); |
| 122 | } | 122 | } |
| ... | @@ -431,7 +431,7 @@ test "heap allocated async function frame" { | ... | @@ -431,7 +431,7 @@ test "heap allocated async function frame" { |
| 431 | test "async function call return value" { | 431 | test "async function call return value" { |
| 432 | const S = struct { | 432 | const S = struct { |
| 433 | var frame: anyframe = undefined; | 433 | var frame: anyframe = undefined; |
| 434 | var pt = Point{.x = 10, .y = 11 }; | 434 | var pt = Point{ .x = 10, .y = 11 }; |
| 435 | | 435 | |
| 436 | fn doTheTest() void { | 436 | fn doTheTest() void { |
| 437 | expectEqual(pt.x, 10); | 437 | expectEqual(pt.x, 10); |
| ... | @@ -568,7 +568,6 @@ test "await inside an errdefer" { | ... | @@ -568,7 +568,6 @@ test "await inside an errdefer" { |
| 568 | frame = @frame(); | 568 | frame = @frame(); |
| 569 | suspend; | 569 | suspend; |
| 570 | } | 570 | } |
| 571 | | | |
| 572 | }; | 571 | }; |
| 573 | S.doTheTest(); | 572 | S.doTheTest(); |
| 574 | } | 573 | } |
| ... | @@ -632,10 +631,10 @@ test "returning a const error from async function" { | ... | @@ -632,10 +631,10 @@ test "returning a const error from async function" { |
| 632 | } | 631 | } |
| 633 | | 632 | |
| 634 | test "async/await typical usage" { | 633 | test "async/await typical usage" { |
| 635 | inline for ([_]bool{false, true}) |b1| { | 634 | inline for ([_]bool{ false, true }) |b1| { |
| 636 | inline for ([_]bool{false, true}) |b2| { | 635 | inline for ([_]bool{ false, true }) |b2| { |
| 637 | inline for ([_]bool{false, true}) |b3| { | 636 | inline for ([_]bool{ false, true }) |b3| { |
| 638 | inline for ([_]bool{false, true}) |b4| { | 637 | inline for ([_]bool{ false, true }) |b4| { |
| 639 | testAsyncAwaitTypicalUsage(b1, b2, b3, b4).doTheTest(); | 638 | testAsyncAwaitTypicalUsage(b1, b2, b3, b4).doTheTest(); |
| 640 | } | 639 | } |
| 641 | } | 640 | } |
| ... | @@ -647,8 +646,8 @@ fn testAsyncAwaitTypicalUsage( | ... | @@ -647,8 +646,8 @@ fn testAsyncAwaitTypicalUsage( |
| 647 | comptime simulate_fail_download: bool, | 646 | comptime simulate_fail_download: bool, |
| 648 | comptime simulate_fail_file: bool, | 647 | comptime simulate_fail_file: bool, |
| 649 | comptime suspend_download: bool, | 648 | comptime suspend_download: bool, |
| 650 | comptime suspend_file: bool) type | 649 | comptime suspend_file: bool, |
| 651 | { | 650 | ) type { |
| 652 | return struct { | 651 | return struct { |
| 653 | fn doTheTest() void { | 652 | fn doTheTest() void { |
| 654 | _ = async amainWrap(); | 653 | _ = async amainWrap(); |