| ... | ... | @@ -442,23 +442,23 @@ test "zig fmt: array types last token" { |
| 442 | 442 | ); |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | | //test "zig fmt: sentinel-terminated array type" { |
| 446 | | // try testCanonical( |
| 447 | | // \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { |
| 448 | | // \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); |
| 449 | | // \\} |
| 450 | | // \\ |
| 451 | | // ); |
| 452 | | //} |
| 453 | | // |
| 454 | | //test "zig fmt: sentinel-terminated slice type" { |
| 455 | | // try testCanonical( |
| 456 | | // \\pub fn toSlice(self: Buffer) [:0]u8 { |
| 457 | | // \\ return self.list.toSlice()[0..self.len()]; |
| 458 | | // \\} |
| 459 | | // \\ |
| 460 | | // ); |
| 461 | | //} |
| 445 | test "zig fmt: sentinel-terminated array type" { |
| 446 | try testCanonical( |
| 447 | \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { |
| 448 | \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); |
| 449 | \\} |
| 450 | \\ |
| 451 | ); |
| 452 | } |
| 453 | |
| 454 | test "zig fmt: sentinel-terminated slice type" { |
| 455 | try testCanonical( |
| 456 | \\pub fn toSlice(self: Buffer) [:0]u8 { |
| 457 | \\ return self.list.toSlice()[0..self.len()]; |
| 458 | \\} |
| 459 | \\ |
| 460 | ); |
| 461 | } |
| 462 | 462 | |
| 463 | 463 | test "zig fmt: pointer-to-one with modifiers" { |
| 464 | 464 | try testCanonical( |
| ... | ... | @@ -2669,28 +2669,28 @@ test "zig fmt: call expression" { |
| 2669 | 2669 | // \\ |
| 2670 | 2670 | // ); |
| 2671 | 2671 | //} |
| 2672 | | // |
| 2673 | | //test "zig fmt: functions" { |
| 2674 | | // try testCanonical( |
| 2675 | | // \\extern fn puts(s: *const u8) c_int; |
| 2676 | | // \\extern "c" fn puts(s: *const u8) c_int; |
| 2677 | | // \\export fn puts(s: *const u8) c_int; |
| 2678 | | // \\fn puts(s: *const u8) callconv(.Inline) c_int; |
| 2679 | | // \\noinline fn puts(s: *const u8) c_int; |
| 2680 | | // \\pub extern fn puts(s: *const u8) c_int; |
| 2681 | | // \\pub extern "c" fn puts(s: *const u8) c_int; |
| 2682 | | // \\pub export fn puts(s: *const u8) c_int; |
| 2683 | | // \\pub fn puts(s: *const u8) callconv(.Inline) c_int; |
| 2684 | | // \\pub noinline fn puts(s: *const u8) c_int; |
| 2685 | | // \\pub extern fn puts(s: *const u8) align(2 + 2) c_int; |
| 2686 | | // \\pub extern "c" fn puts(s: *const u8) align(2 + 2) c_int; |
| 2687 | | // \\pub export fn puts(s: *const u8) align(2 + 2) c_int; |
| 2688 | | // \\pub fn puts(s: *const u8) align(2 + 2) callconv(.Inline) c_int; |
| 2689 | | // \\pub noinline fn puts(s: *const u8) align(2 + 2) c_int; |
| 2690 | | // \\ |
| 2691 | | // ); |
| 2692 | | //} |
| 2693 | | // |
| 2672 | |
| 2673 | test "zig fmt: functions" { |
| 2674 | try testCanonical( |
| 2675 | \\extern fn puts(s: *const u8) c_int; |
| 2676 | \\extern "c" fn puts(s: *const u8) c_int; |
| 2677 | \\export fn puts(s: *const u8) c_int; |
| 2678 | \\fn puts(s: *const u8) callconv(.Inline) c_int; |
| 2679 | \\noinline fn puts(s: *const u8) c_int; |
| 2680 | \\pub extern fn puts(s: *const u8) c_int; |
| 2681 | \\pub extern "c" fn puts(s: *const u8) c_int; |
| 2682 | \\pub export fn puts(s: *const u8) c_int; |
| 2683 | \\pub fn puts(s: *const u8) callconv(.Inline) c_int; |
| 2684 | \\pub noinline fn puts(s: *const u8) c_int; |
| 2685 | \\pub extern fn puts(s: *const u8) align(2 + 2) c_int; |
| 2686 | \\pub extern "c" fn puts(s: *const u8) align(2 + 2) c_int; |
| 2687 | \\pub export fn puts(s: *const u8) align(2 + 2) c_int; |
| 2688 | \\pub fn puts(s: *const u8) align(2 + 2) callconv(.Inline) c_int; |
| 2689 | \\pub noinline fn puts(s: *const u8) align(2 + 2) c_int; |
| 2690 | \\ |
| 2691 | ); |
| 2692 | } |
| 2693 | |
| 2694 | 2694 | //test "zig fmt: multiline string" { |
| 2695 | 2695 | // try testCanonical( |
| 2696 | 2696 | // \\test "" { |