zig fmt: while loops

This commit is contained in:
Andrew Kelley
2021-02-09 17:23:57 -07:00
parent bcafc51e58
commit 1c79eea125
4 changed files with 272 additions and 183 deletions

View File

@@ -714,19 +714,19 @@ test "zig fmt: async function" {
// \\
// );
//}
//
//test "zig fmt: while else err prong with no block" {
// try testCanonical(
// \\test "" {
// \\ const result = while (returnError()) |value| {
// \\ break value;
// \\ } else |err| @as(i32, 2);
// \\ expect(result == 2);
// \\}
// \\
// );
//}
//
test "zig fmt: while else err prong with no block" {
try testCanonical(
\\test "" {
\\ const result = while (returnError()) |value| {
\\ break value;
\\ } else |err| @as(i32, 2);
\\ expect(result == 2);
\\}
\\
);
}
//test "zig fmt: tagged union with enum values" {
// try testCanonical(
// \\const MultipleChoice2 = union(enum(u32)) {