| ... | ... | @@ -1410,31 +1410,31 @@ test "zig fmt: if condition wraps" { |
| 1410 | 1410 | \\ |
| 1411 | 1411 | ); |
| 1412 | 1412 | } |
| 1413 | | // |
| 1414 | | //test "zig fmt: if condition has line break but must not wrap" { |
| 1415 | | // try testCanonical( |
| 1416 | | // \\comptime { |
| 1417 | | // \\ if (self.user_input_options.put( |
| 1418 | | // \\ name, |
| 1419 | | // \\ UserInputOption{ |
| 1420 | | // \\ .name = name, |
| 1421 | | // \\ .used = false, |
| 1422 | | // \\ }, |
| 1423 | | // \\ ) catch unreachable) |*prev_value| { |
| 1424 | | // \\ foo(); |
| 1425 | | // \\ bar(); |
| 1426 | | // \\ } |
| 1427 | | // \\ if (put( |
| 1428 | | // \\ a, |
| 1429 | | // \\ b, |
| 1430 | | // \\ )) { |
| 1431 | | // \\ foo(); |
| 1432 | | // \\ } |
| 1433 | | // \\} |
| 1434 | | // \\ |
| 1435 | | // ); |
| 1436 | | //} |
| 1437 | | // |
| 1413 | |
| 1414 | test "zig fmt: if condition has line break but must not wrap" { |
| 1415 | try testCanonical( |
| 1416 | \\comptime { |
| 1417 | \\ if (self.user_input_options.put( |
| 1418 | \\ name, |
| 1419 | \\ UserInputOption{ |
| 1420 | \\ .name = name, |
| 1421 | \\ .used = false, |
| 1422 | \\ }, |
| 1423 | \\ ) catch unreachable) |*prev_value| { |
| 1424 | \\ foo(); |
| 1425 | \\ bar(); |
| 1426 | \\ } |
| 1427 | \\ if (put( |
| 1428 | \\ a, |
| 1429 | \\ b, |
| 1430 | \\ )) { |
| 1431 | \\ foo(); |
| 1432 | \\ } |
| 1433 | \\} |
| 1434 | \\ |
| 1435 | ); |
| 1436 | } |
| 1437 | |
| 1438 | 1438 | //test "zig fmt: if condition has line break but must not wrap" { |
| 1439 | 1439 | // try testCanonical( |
| 1440 | 1440 | // \\comptime { |