| ... | @@ -26,6 +26,8 @@ test "zig fmt: tuple struct" { | ... | @@ -26,6 +26,8 @@ test "zig fmt: tuple struct" { |
| 26 | } | 26 | } |
| 27 | | 27 | |
| 28 | test "zig fmt: preserves clobbers in inline asm with stray comma" { | 28 | test "zig fmt: preserves clobbers in inline asm with stray comma" { |
| | 29 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 30 | |
| 29 | try testCanonical( | 31 | try testCanonical( |
| 30 | \\fn foo() void { | 32 | \\fn foo() void { |
| 31 | \\ asm volatile ("" | 33 | \\ asm volatile ("" |
| ... | @@ -44,6 +46,8 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" { | ... | @@ -44,6 +46,8 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" { |
| 44 | } | 46 | } |
| 45 | | 47 | |
| 46 | test "zig fmt: remove trailing comma at the end of assembly clobber" { | 48 | test "zig fmt: remove trailing comma at the end of assembly clobber" { |
| | 49 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 50 | |
| 47 | try testTransform( | 51 | try testTransform( |
| 48 | \\fn foo() void { | 52 | \\fn foo() void { |
| 49 | \\ asm volatile ("" | 53 | \\ asm volatile ("" |
| ... | @@ -66,6 +70,8 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" { | ... | @@ -66,6 +70,8 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" { |
| 66 | } | 70 | } |
| 67 | | 71 | |
| 68 | test "zig fmt: respect line breaks in struct field value declaration" { | 72 | test "zig fmt: respect line breaks in struct field value declaration" { |
| | 73 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 74 | |
| 69 | try testCanonical( | 75 | try testCanonical( |
| 70 | \\const Foo = struct { | 76 | \\const Foo = struct { |
| 71 | \\ bar: u32 = | 77 | \\ bar: u32 = |
| ... | @@ -220,6 +226,8 @@ test "zig fmt: file ends in comment after var decl" { | ... | @@ -220,6 +226,8 @@ test "zig fmt: file ends in comment after var decl" { |
| 220 | } | 226 | } |
| 221 | | 227 | |
| 222 | test "zig fmt: if statement" { | 228 | test "zig fmt: if statement" { |
| | 229 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 230 | |
| 223 | try testCanonical( | 231 | try testCanonical( |
| 224 | \\test "" { | 232 | \\test "" { |
| 225 | \\ if (optional()) |some| | 233 | \\ if (optional()) |some| |
| ... | @@ -318,6 +326,8 @@ test "zig fmt: decl between fields" { | ... | @@ -318,6 +326,8 @@ test "zig fmt: decl between fields" { |
| 318 | } | 326 | } |
| 319 | | 327 | |
| 320 | test "zig fmt: errdefer with payload" { | 328 | test "zig fmt: errdefer with payload" { |
| | 329 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 330 | |
| 321 | try testCanonical( | 331 | try testCanonical( |
| 322 | \\pub fn main() anyerror!void { | 332 | \\pub fn main() anyerror!void { |
| 323 | \\ errdefer |a| x += 1; | 333 | \\ errdefer |a| x += 1; |
| ... | @@ -331,6 +341,8 @@ test "zig fmt: errdefer with payload" { | ... | @@ -331,6 +341,8 @@ test "zig fmt: errdefer with payload" { |
| 331 | } | 341 | } |
| 332 | | 342 | |
| 333 | test "zig fmt: nosuspend block" { | 343 | test "zig fmt: nosuspend block" { |
| | 344 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 345 | |
| 334 | try testCanonical( | 346 | try testCanonical( |
| 335 | \\pub fn main() anyerror!void { | 347 | \\pub fn main() anyerror!void { |
| 336 | \\ nosuspend { | 348 | \\ nosuspend { |
| ... | @@ -342,6 +354,8 @@ test "zig fmt: nosuspend block" { | ... | @@ -342,6 +354,8 @@ test "zig fmt: nosuspend block" { |
| 342 | } | 354 | } |
| 343 | | 355 | |
| 344 | test "zig fmt: nosuspend await" { | 356 | test "zig fmt: nosuspend await" { |
| | 357 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 358 | |
| 345 | try testCanonical( | 359 | try testCanonical( |
| 346 | \\fn foo() void { | 360 | \\fn foo() void { |
| 347 | \\ x = nosuspend await y; | 361 | \\ x = nosuspend await y; |
| ... | @@ -362,6 +376,8 @@ test "zig fmt: container declaration, single line" { | ... | @@ -362,6 +376,8 @@ test "zig fmt: container declaration, single line" { |
| 362 | } | 376 | } |
| 363 | | 377 | |
| 364 | test "zig fmt: container declaration, one item, multi line trailing comma" { | 378 | test "zig fmt: container declaration, one item, multi line trailing comma" { |
| | 379 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 380 | |
| 365 | try testCanonical( | 381 | try testCanonical( |
| 366 | \\test "" { | 382 | \\test "" { |
| 367 | \\ comptime { | 383 | \\ comptime { |
| ... | @@ -375,6 +391,8 @@ test "zig fmt: container declaration, one item, multi line trailing comma" { | ... | @@ -375,6 +391,8 @@ test "zig fmt: container declaration, one item, multi line trailing comma" { |
| 375 | } | 391 | } |
| 376 | | 392 | |
| 377 | test "zig fmt: container declaration, no trailing comma on separate line" { | 393 | test "zig fmt: container declaration, no trailing comma on separate line" { |
| | 394 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 395 | |
| 378 | try testTransform( | 396 | try testTransform( |
| 379 | \\test "" { | 397 | \\test "" { |
| 380 | \\ comptime { | 398 | \\ comptime { |
| ... | @@ -501,6 +519,8 @@ test "zig fmt: remove empty lines at start/end of container decl" { | ... | @@ -501,6 +519,8 @@ test "zig fmt: remove empty lines at start/end of container decl" { |
| 501 | } | 519 | } |
| 502 | | 520 | |
| 503 | test "zig fmt: remove empty lines at start/end of block" { | 521 | test "zig fmt: remove empty lines at start/end of block" { |
| | 522 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 523 | |
| 504 | try testTransform( | 524 | try testTransform( |
| 505 | \\test { | 525 | \\test { |
| 506 | \\ | 526 | \\ |
| ... | @@ -521,6 +541,8 @@ test "zig fmt: remove empty lines at start/end of block" { | ... | @@ -521,6 +541,8 @@ test "zig fmt: remove empty lines at start/end of block" { |
| 521 | } | 541 | } |
| 522 | | 542 | |
| 523 | test "zig fmt: allow empty line before comment at start of block" { | 543 | test "zig fmt: allow empty line before comment at start of block" { |
| | 544 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 545 | |
| 524 | try testCanonical( | 546 | try testCanonical( |
| 525 | \\test { | 547 | \\test { |
| 526 | \\ | 548 | \\ |
| ... | @@ -584,6 +606,8 @@ test "zig fmt: comptime struct field" { | ... | @@ -584,6 +606,8 @@ test "zig fmt: comptime struct field" { |
| 584 | } | 606 | } |
| 585 | | 607 | |
| 586 | test "zig fmt: break from block" { | 608 | test "zig fmt: break from block" { |
| | 609 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 610 | |
| 587 | try testCanonical( | 611 | try testCanonical( |
| 588 | \\const a = blk: { | 612 | \\const a = blk: { |
| 589 | \\ break :blk 42; | 613 | \\ break :blk 42; |
| ... | @@ -616,6 +640,8 @@ test "zig fmt: c pointer type" { | ... | @@ -616,6 +640,8 @@ test "zig fmt: c pointer type" { |
| 616 | } | 640 | } |
| 617 | | 641 | |
| 618 | test "zig fmt: builtin call with trailing comma" { | 642 | test "zig fmt: builtin call with trailing comma" { |
| | 643 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 644 | |
| 619 | try testCanonical( | 645 | try testCanonical( |
| 620 | \\pub fn main() void { | 646 | \\pub fn main() void { |
| 621 | \\ @breakpoint(); | 647 | \\ @breakpoint(); |
| ... | @@ -631,6 +657,8 @@ test "zig fmt: builtin call with trailing comma" { | ... | @@ -631,6 +657,8 @@ test "zig fmt: builtin call with trailing comma" { |
| 631 | } | 657 | } |
| 632 | | 658 | |
| 633 | test "zig fmt: asm expression with comptime content" { | 659 | test "zig fmt: asm expression with comptime content" { |
| | 660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 661 | |
| 634 | try testCanonical( | 662 | try testCanonical( |
| 635 | \\comptime { | 663 | \\comptime { |
| 636 | \\ asm ("foo" ++ "bar"); | 664 | \\ asm ("foo" ++ "bar"); |
| ... | @@ -655,6 +683,8 @@ test "zig fmt: asm expression with comptime content" { | ... | @@ -655,6 +683,8 @@ test "zig fmt: asm expression with comptime content" { |
| 655 | } | 683 | } |
| 656 | | 684 | |
| 657 | test "zig fmt: array types last token" { | 685 | test "zig fmt: array types last token" { |
| | 686 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 687 | |
| 658 | try testCanonical( | 688 | try testCanonical( |
| 659 | \\test { | 689 | \\test { |
| 660 | \\ const x = [40]u32; | 690 | \\ const x = [40]u32; |
| ... | @@ -668,6 +698,8 @@ test "zig fmt: array types last token" { | ... | @@ -668,6 +698,8 @@ test "zig fmt: array types last token" { |
| 668 | } | 698 | } |
| 669 | | 699 | |
| 670 | test "zig fmt: sentinel-terminated array type" { | 700 | test "zig fmt: sentinel-terminated array type" { |
| | 701 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 702 | |
| 671 | try testCanonical( | 703 | try testCanonical( |
| 672 | \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { | 704 | \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { |
| 673 | \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); | 705 | \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); |
| ... | @@ -677,6 +709,8 @@ test "zig fmt: sentinel-terminated array type" { | ... | @@ -677,6 +709,8 @@ test "zig fmt: sentinel-terminated array type" { |
| 677 | } | 709 | } |
| 678 | | 710 | |
| 679 | test "zig fmt: sentinel-terminated slice type" { | 711 | test "zig fmt: sentinel-terminated slice type" { |
| | 712 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 713 | |
| 680 | try testCanonical( | 714 | try testCanonical( |
| 681 | \\pub fn toSlice(self: Buffer) [:0]u8 { | 715 | \\pub fn toSlice(self: Buffer) [:0]u8 { |
| 682 | \\ return self.list.toSlice()[0..self.len()]; | 716 | \\ return self.list.toSlice()[0..self.len()]; |
| ... | @@ -748,6 +782,8 @@ test "zig fmt: anon literal in array" { | ... | @@ -748,6 +782,8 @@ test "zig fmt: anon literal in array" { |
| 748 | } | 782 | } |
| 749 | | 783 | |
| 750 | test "zig fmt: alignment in anonymous literal" { | 784 | test "zig fmt: alignment in anonymous literal" { |
| | 785 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 786 | |
| 751 | try testTransform( | 787 | try testTransform( |
| 752 | \\const a = .{ | 788 | \\const a = .{ |
| 753 | \\ "U", "L", "F", | 789 | \\ "U", "L", "F", |
| ... | @@ -766,6 +802,8 @@ test "zig fmt: alignment in anonymous literal" { | ... | @@ -766,6 +802,8 @@ test "zig fmt: alignment in anonymous literal" { |
| 766 | } | 802 | } |
| 767 | | 803 | |
| 768 | test "zig fmt: anon struct literal 0 element" { | 804 | test "zig fmt: anon struct literal 0 element" { |
| | 805 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 806 | |
| 769 | try testCanonical( | 807 | try testCanonical( |
| 770 | \\test { | 808 | \\test { |
| 771 | \\ const x = .{}; | 809 | \\ const x = .{}; |
| ... | @@ -775,6 +813,8 @@ test "zig fmt: anon struct literal 0 element" { | ... | @@ -775,6 +813,8 @@ test "zig fmt: anon struct literal 0 element" { |
| 775 | } | 813 | } |
| 776 | | 814 | |
| 777 | test "zig fmt: anon struct literal 1 element" { | 815 | test "zig fmt: anon struct literal 1 element" { |
| | 816 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 817 | |
| 778 | try testCanonical( | 818 | try testCanonical( |
| 779 | \\test { | 819 | \\test { |
| 780 | \\ const x = .{ .a = b }; | 820 | \\ const x = .{ .a = b }; |
| ... | @@ -784,6 +824,8 @@ test "zig fmt: anon struct literal 1 element" { | ... | @@ -784,6 +824,8 @@ test "zig fmt: anon struct literal 1 element" { |
| 784 | } | 824 | } |
| 785 | | 825 | |
| 786 | test "zig fmt: anon struct literal 1 element comma" { | 826 | test "zig fmt: anon struct literal 1 element comma" { |
| | 827 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 828 | |
| 787 | try testCanonical( | 829 | try testCanonical( |
| 788 | \\test { | 830 | \\test { |
| 789 | \\ const x = .{ | 831 | \\ const x = .{ |
| ... | @@ -795,6 +837,8 @@ test "zig fmt: anon struct literal 1 element comma" { | ... | @@ -795,6 +837,8 @@ test "zig fmt: anon struct literal 1 element comma" { |
| 795 | } | 837 | } |
| 796 | | 838 | |
| 797 | test "zig fmt: anon struct literal 2 element" { | 839 | test "zig fmt: anon struct literal 2 element" { |
| | 840 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 841 | |
| 798 | try testCanonical( | 842 | try testCanonical( |
| 799 | \\test { | 843 | \\test { |
| 800 | \\ const x = .{ .a = b, .c = d }; | 844 | \\ const x = .{ .a = b, .c = d }; |
| ... | @@ -804,6 +848,8 @@ test "zig fmt: anon struct literal 2 element" { | ... | @@ -804,6 +848,8 @@ test "zig fmt: anon struct literal 2 element" { |
| 804 | } | 848 | } |
| 805 | | 849 | |
| 806 | test "zig fmt: anon struct literal 2 element comma" { | 850 | test "zig fmt: anon struct literal 2 element comma" { |
| | 851 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 852 | |
| 807 | try testCanonical( | 853 | try testCanonical( |
| 808 | \\test { | 854 | \\test { |
| 809 | \\ const x = .{ | 855 | \\ const x = .{ |
| ... | @@ -816,6 +862,8 @@ test "zig fmt: anon struct literal 2 element comma" { | ... | @@ -816,6 +862,8 @@ test "zig fmt: anon struct literal 2 element comma" { |
| 816 | } | 862 | } |
| 817 | | 863 | |
| 818 | test "zig fmt: anon struct literal 3 element" { | 864 | test "zig fmt: anon struct literal 3 element" { |
| | 865 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 866 | |
| 819 | try testCanonical( | 867 | try testCanonical( |
| 820 | \\test { | 868 | \\test { |
| 821 | \\ const x = .{ .a = b, .c = d, .e = f }; | 869 | \\ const x = .{ .a = b, .c = d, .e = f }; |
| ... | @@ -825,6 +873,8 @@ test "zig fmt: anon struct literal 3 element" { | ... | @@ -825,6 +873,8 @@ test "zig fmt: anon struct literal 3 element" { |
| 825 | } | 873 | } |
| 826 | | 874 | |
| 827 | test "zig fmt: anon struct literal 3 element comma" { | 875 | test "zig fmt: anon struct literal 3 element comma" { |
| | 876 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 877 | |
| 828 | try testCanonical( | 878 | try testCanonical( |
| 829 | \\test { | 879 | \\test { |
| 830 | \\ const x = .{ | 880 | \\ const x = .{ |
| ... | @@ -838,6 +888,8 @@ test "zig fmt: anon struct literal 3 element comma" { | ... | @@ -838,6 +888,8 @@ test "zig fmt: anon struct literal 3 element comma" { |
| 838 | } | 888 | } |
| 839 | | 889 | |
| 840 | test "zig fmt: struct literal 0 element" { | 890 | test "zig fmt: struct literal 0 element" { |
| | 891 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 892 | |
| 841 | try testCanonical( | 893 | try testCanonical( |
| 842 | \\test { | 894 | \\test { |
| 843 | \\ const x = X{}; | 895 | \\ const x = X{}; |
| ... | @@ -847,6 +899,8 @@ test "zig fmt: struct literal 0 element" { | ... | @@ -847,6 +899,8 @@ test "zig fmt: struct literal 0 element" { |
| 847 | } | 899 | } |
| 848 | | 900 | |
| 849 | test "zig fmt: struct literal 1 element" { | 901 | test "zig fmt: struct literal 1 element" { |
| | 902 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 903 | |
| 850 | try testCanonical( | 904 | try testCanonical( |
| 851 | \\test { | 905 | \\test { |
| 852 | \\ const x = X{ .a = b }; | 906 | \\ const x = X{ .a = b }; |
| ... | @@ -856,6 +910,8 @@ test "zig fmt: struct literal 1 element" { | ... | @@ -856,6 +910,8 @@ test "zig fmt: struct literal 1 element" { |
| 856 | } | 910 | } |
| 857 | | 911 | |
| 858 | test "zig fmt: Unicode code point literal larger than u8" { | 912 | test "zig fmt: Unicode code point literal larger than u8" { |
| | 913 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 914 | |
| 859 | try testCanonical( | 915 | try testCanonical( |
| 860 | \\test { | 916 | \\test { |
| 861 | \\ const x = X{ | 917 | \\ const x = X{ |
| ... | @@ -867,6 +923,8 @@ test "zig fmt: Unicode code point literal larger than u8" { | ... | @@ -867,6 +923,8 @@ test "zig fmt: Unicode code point literal larger than u8" { |
| 867 | } | 923 | } |
| 868 | | 924 | |
| 869 | test "zig fmt: struct literal 2 element" { | 925 | test "zig fmt: struct literal 2 element" { |
| | 926 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 927 | |
| 870 | try testCanonical( | 928 | try testCanonical( |
| 871 | \\test { | 929 | \\test { |
| 872 | \\ const x = X{ .a = b, .c = d }; | 930 | \\ const x = X{ .a = b, .c = d }; |
| ... | @@ -876,6 +934,8 @@ test "zig fmt: struct literal 2 element" { | ... | @@ -876,6 +934,8 @@ test "zig fmt: struct literal 2 element" { |
| 876 | } | 934 | } |
| 877 | | 935 | |
| 878 | test "zig fmt: struct literal 2 element comma" { | 936 | test "zig fmt: struct literal 2 element comma" { |
| | 937 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 938 | |
| 879 | try testCanonical( | 939 | try testCanonical( |
| 880 | \\test { | 940 | \\test { |
| 881 | \\ const x = X{ | 941 | \\ const x = X{ |
| ... | @@ -888,6 +948,8 @@ test "zig fmt: struct literal 2 element comma" { | ... | @@ -888,6 +948,8 @@ test "zig fmt: struct literal 2 element comma" { |
| 888 | } | 948 | } |
| 889 | | 949 | |
| 890 | test "zig fmt: struct literal 3 element" { | 950 | test "zig fmt: struct literal 3 element" { |
| | 951 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 952 | |
| 891 | try testCanonical( | 953 | try testCanonical( |
| 892 | \\test { | 954 | \\test { |
| 893 | \\ const x = X{ .a = b, .c = d, .e = f }; | 955 | \\ const x = X{ .a = b, .c = d, .e = f }; |
| ... | @@ -897,6 +959,8 @@ test "zig fmt: struct literal 3 element" { | ... | @@ -897,6 +959,8 @@ test "zig fmt: struct literal 3 element" { |
| 897 | } | 959 | } |
| 898 | | 960 | |
| 899 | test "zig fmt: struct literal 3 element comma" { | 961 | test "zig fmt: struct literal 3 element comma" { |
| | 962 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 963 | |
| 900 | try testCanonical( | 964 | try testCanonical( |
| 901 | \\test { | 965 | \\test { |
| 902 | \\ const x = X{ | 966 | \\ const x = X{ |
| ... | @@ -910,6 +974,8 @@ test "zig fmt: struct literal 3 element comma" { | ... | @@ -910,6 +974,8 @@ test "zig fmt: struct literal 3 element comma" { |
| 910 | } | 974 | } |
| 911 | | 975 | |
| 912 | test "zig fmt: anon list literal 1 element" { | 976 | test "zig fmt: anon list literal 1 element" { |
| | 977 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 978 | |
| 913 | try testCanonical( | 979 | try testCanonical( |
| 914 | \\test { | 980 | \\test { |
| 915 | \\ const x = .{a}; | 981 | \\ const x = .{a}; |
| ... | @@ -930,6 +996,8 @@ test "zig fmt: anon list literal 1 element comma" { | ... | @@ -930,6 +996,8 @@ test "zig fmt: anon list literal 1 element comma" { |
| 930 | } | 996 | } |
| 931 | | 997 | |
| 932 | test "zig fmt: anon list literal 2 element" { | 998 | test "zig fmt: anon list literal 2 element" { |
| | 999 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1000 | |
| 933 | try testCanonical( | 1001 | try testCanonical( |
| 934 | \\test { | 1002 | \\test { |
| 935 | \\ const x = .{ a, b }; | 1003 | \\ const x = .{ a, b }; |
| ... | @@ -951,6 +1019,8 @@ test "zig fmt: anon list literal 2 element comma" { | ... | @@ -951,6 +1019,8 @@ test "zig fmt: anon list literal 2 element comma" { |
| 951 | } | 1019 | } |
| 952 | | 1020 | |
| 953 | test "zig fmt: anon list literal 3 element" { | 1021 | test "zig fmt: anon list literal 3 element" { |
| | 1022 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1023 | |
| 954 | try testCanonical( | 1024 | try testCanonical( |
| 955 | \\test { | 1025 | \\test { |
| 956 | \\ const x = .{ a, b, c }; | 1026 | \\ const x = .{ a, b, c }; |
| ... | @@ -975,6 +1045,8 @@ test "zig fmt: anon list literal 3 element comma" { | ... | @@ -975,6 +1045,8 @@ test "zig fmt: anon list literal 3 element comma" { |
| 975 | } | 1045 | } |
| 976 | | 1046 | |
| 977 | test "zig fmt: array literal 0 element" { | 1047 | test "zig fmt: array literal 0 element" { |
| | 1048 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1049 | |
| 978 | try testCanonical( | 1050 | try testCanonical( |
| 979 | \\test { | 1051 | \\test { |
| 980 | \\ const x = [_]u32{}; | 1052 | \\ const x = [_]u32{}; |
| ... | @@ -984,6 +1056,8 @@ test "zig fmt: array literal 0 element" { | ... | @@ -984,6 +1056,8 @@ test "zig fmt: array literal 0 element" { |
| 984 | } | 1056 | } |
| 985 | | 1057 | |
| 986 | test "zig fmt: array literal 1 element" { | 1058 | test "zig fmt: array literal 1 element" { |
| | 1059 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1060 | |
| 987 | try testCanonical( | 1061 | try testCanonical( |
| 988 | \\test { | 1062 | \\test { |
| 989 | \\ const x = [_]u32{a}; | 1063 | \\ const x = [_]u32{a}; |
| ... | @@ -1004,6 +1078,8 @@ test "zig fmt: array literal 1 element comma" { | ... | @@ -1004,6 +1078,8 @@ test "zig fmt: array literal 1 element comma" { |
| 1004 | } | 1078 | } |
| 1005 | | 1079 | |
| 1006 | test "zig fmt: array literal 2 element" { | 1080 | test "zig fmt: array literal 2 element" { |
| | 1081 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1082 | |
| 1007 | try testCanonical( | 1083 | try testCanonical( |
| 1008 | \\test { | 1084 | \\test { |
| 1009 | \\ const x = [_]u32{ a, b }; | 1085 | \\ const x = [_]u32{ a, b }; |
| ... | @@ -1025,6 +1101,8 @@ test "zig fmt: array literal 2 element comma" { | ... | @@ -1025,6 +1101,8 @@ test "zig fmt: array literal 2 element comma" { |
| 1025 | } | 1101 | } |
| 1026 | | 1102 | |
| 1027 | test "zig fmt: array literal 3 element" { | 1103 | test "zig fmt: array literal 3 element" { |
| | 1104 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1105 | |
| 1028 | try testCanonical( | 1106 | try testCanonical( |
| 1029 | \\test { | 1107 | \\test { |
| 1030 | \\ const x = [_]u32{ a, b, c }; | 1108 | \\ const x = [_]u32{ a, b, c }; |
| ... | @@ -1047,6 +1125,8 @@ test "zig fmt: array literal 3 element comma" { | ... | @@ -1047,6 +1125,8 @@ test "zig fmt: array literal 3 element comma" { |
| 1047 | } | 1125 | } |
| 1048 | | 1126 | |
| 1049 | test "zig fmt: sentinel array literal 1 element" { | 1127 | test "zig fmt: sentinel array literal 1 element" { |
| | 1128 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1129 | |
| 1050 | try testCanonical( | 1130 | try testCanonical( |
| 1051 | \\test { | 1131 | \\test { |
| 1052 | \\ const x = [_:9000]u32{a}; | 1132 | \\ const x = [_:9000]u32{a}; |
| ... | @@ -1076,6 +1156,8 @@ test "zig fmt: slices with spaces in bounds" { | ... | @@ -1076,6 +1156,8 @@ test "zig fmt: slices with spaces in bounds" { |
| 1076 | } | 1156 | } |
| 1077 | | 1157 | |
| 1078 | test "zig fmt: block in slice expression" { | 1158 | test "zig fmt: block in slice expression" { |
| | 1159 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1160 | |
| 1079 | try testCanonical( | 1161 | try testCanonical( |
| 1080 | \\const a = b[{ | 1162 | \\const a = b[{ |
| 1081 | \\ _ = x; | 1163 | \\ _ = x; |
| ... | @@ -1094,6 +1176,8 @@ test "zig fmt: block in slice expression" { | ... | @@ -1094,6 +1176,8 @@ test "zig fmt: block in slice expression" { |
| 1094 | } | 1176 | } |
| 1095 | | 1177 | |
| 1096 | test "zig fmt: async function" { | 1178 | test "zig fmt: async function" { |
| | 1179 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1180 | |
| 1097 | try testCanonical( | 1181 | try testCanonical( |
| 1098 | \\pub const Server = struct { | 1182 | \\pub const Server = struct { |
| 1099 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void, | 1183 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void, |
| ... | @@ -1106,6 +1190,8 @@ test "zig fmt: async function" { | ... | @@ -1106,6 +1190,8 @@ test "zig fmt: async function" { |
| 1106 | } | 1190 | } |
| 1107 | | 1191 | |
| 1108 | test "zig fmt: whitespace fixes" { | 1192 | test "zig fmt: whitespace fixes" { |
| | 1193 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1194 | |
| 1109 | try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", | 1195 | try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", |
| 1110 | \\test "" { | 1196 | \\test "" { |
| 1111 | \\ const hi = x; | 1197 | \\ const hi = x; |
| ... | @@ -1118,6 +1204,8 @@ test "zig fmt: whitespace fixes" { | ... | @@ -1118,6 +1204,8 @@ test "zig fmt: whitespace fixes" { |
| 1118 | } | 1204 | } |
| 1119 | | 1205 | |
| 1120 | test "zig fmt: while else err prong with no block" { | 1206 | test "zig fmt: while else err prong with no block" { |
| | 1207 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1208 | |
| 1121 | try testCanonical( | 1209 | try testCanonical( |
| 1122 | \\test "" { | 1210 | \\test "" { |
| 1123 | \\ const result = while (returnError()) |value| { | 1211 | \\ const result = while (returnError()) |value| { |
| ... | @@ -1147,6 +1235,8 @@ test "zig fmt: tagged union with enum values" { | ... | @@ -1147,6 +1235,8 @@ test "zig fmt: tagged union with enum values" { |
| 1147 | } | 1235 | } |
| 1148 | | 1236 | |
| 1149 | test "zig fmt: tagged union enum tag last token" { | 1237 | test "zig fmt: tagged union enum tag last token" { |
| | 1238 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1239 | |
| 1150 | try testCanonical( | 1240 | try testCanonical( |
| 1151 | \\test { | 1241 | \\test { |
| 1152 | \\ const U = union(enum(u32)) {}; | 1242 | \\ const U = union(enum(u32)) {}; |
| ... | @@ -1482,6 +1572,8 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" { | ... | @@ -1482,6 +1572,8 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" { |
| 1482 | } | 1572 | } |
| 1483 | | 1573 | |
| 1484 | test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { | 1574 | test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { |
| | 1575 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1576 | |
| 1485 | try testTransform( | 1577 | try testTransform( |
| 1486 | \\test "" { | 1578 | \\test "" { |
| 1487 | \\ const x = 42; | 1579 | \\ const x = 42; |
| ... | @@ -1508,6 +1600,8 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { | ... | @@ -1508,6 +1600,8 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { |
| 1508 | } | 1600 | } |
| 1509 | | 1601 | |
| 1510 | test "zig fmt: 'zig fmt: on' indentation is unchanged" { | 1602 | test "zig fmt: 'zig fmt: on' indentation is unchanged" { |
| | 1603 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1604 | |
| 1511 | try testCanonical( | 1605 | try testCanonical( |
| 1512 | \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void { | 1606 | \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void { |
| 1513 | \\ // zig fmt: off | 1607 | \\ // zig fmt: off |
| ... | @@ -1550,6 +1644,8 @@ test "zig fmt: spaces around slice operator" { | ... | @@ -1550,6 +1644,8 @@ test "zig fmt: spaces around slice operator" { |
| 1550 | } | 1644 | } |
| 1551 | | 1645 | |
| 1552 | test "zig fmt: async call in if condition" { | 1646 | test "zig fmt: async call in if condition" { |
| | 1647 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1648 | |
| 1553 | try testCanonical( | 1649 | try testCanonical( |
| 1554 | \\comptime { | 1650 | \\comptime { |
| 1555 | \\ if (async b()) { | 1651 | \\ if (async b()) { |
| ... | @@ -1561,6 +1657,8 @@ test "zig fmt: async call in if condition" { | ... | @@ -1561,6 +1657,8 @@ test "zig fmt: async call in if condition" { |
| 1561 | } | 1657 | } |
| 1562 | | 1658 | |
| 1563 | test "zig fmt: 2nd arg multiline string" { | 1659 | test "zig fmt: 2nd arg multiline string" { |
| | 1660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1661 | |
| 1564 | try testCanonical( | 1662 | try testCanonical( |
| 1565 | \\comptime { | 1663 | \\comptime { |
| 1566 | \\ cases.addAsm("hello world linux x86_64", | 1664 | \\ cases.addAsm("hello world linux x86_64", |
| ... | @@ -1589,6 +1687,8 @@ test "zig fmt: 2nd arg multiline string" { | ... | @@ -1589,6 +1687,8 @@ test "zig fmt: 2nd arg multiline string" { |
| 1589 | } | 1687 | } |
| 1590 | | 1688 | |
| 1591 | test "zig fmt: 2nd arg multiline string many args" { | 1689 | test "zig fmt: 2nd arg multiline string many args" { |
| | 1690 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1691 | |
| 1592 | try testCanonical( | 1692 | try testCanonical( |
| 1593 | \\comptime { | 1693 | \\comptime { |
| 1594 | \\ cases.addAsm("hello world linux x86_64", | 1694 | \\ cases.addAsm("hello world linux x86_64", |
| ... | @@ -1600,6 +1700,8 @@ test "zig fmt: 2nd arg multiline string many args" { | ... | @@ -1600,6 +1700,8 @@ test "zig fmt: 2nd arg multiline string many args" { |
| 1600 | } | 1700 | } |
| 1601 | | 1701 | |
| 1602 | test "zig fmt: final arg multiline string" { | 1702 | test "zig fmt: final arg multiline string" { |
| | 1703 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1704 | |
| 1603 | try testCanonical( | 1705 | try testCanonical( |
| 1604 | \\comptime { | 1706 | \\comptime { |
| 1605 | \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n", | 1707 | \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n", |
| ... | @@ -1611,6 +1713,8 @@ test "zig fmt: final arg multiline string" { | ... | @@ -1611,6 +1713,8 @@ test "zig fmt: final arg multiline string" { |
| 1611 | } | 1713 | } |
| 1612 | | 1714 | |
| 1613 | test "zig fmt: if condition wraps" { | 1715 | test "zig fmt: if condition wraps" { |
| | 1716 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1717 | |
| 1614 | try testTransform( | 1718 | try testTransform( |
| 1615 | \\comptime { | 1719 | \\comptime { |
| 1616 | \\ if (cond and | 1720 | \\ if (cond and |
| ... | @@ -1692,6 +1796,8 @@ test "zig fmt: if condition wraps" { | ... | @@ -1692,6 +1796,8 @@ test "zig fmt: if condition wraps" { |
| 1692 | } | 1796 | } |
| 1693 | | 1797 | |
| 1694 | test "zig fmt: if condition has line break but must not wrap" { | 1798 | test "zig fmt: if condition has line break but must not wrap" { |
| | 1799 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1800 | |
| 1695 | try testCanonical( | 1801 | try testCanonical( |
| 1696 | \\comptime { | 1802 | \\comptime { |
| 1697 | \\ if (self.user_input_options.put( | 1803 | \\ if (self.user_input_options.put( |
| ... | @@ -1716,6 +1822,8 @@ test "zig fmt: if condition has line break but must not wrap" { | ... | @@ -1716,6 +1822,8 @@ test "zig fmt: if condition has line break but must not wrap" { |
| 1716 | } | 1822 | } |
| 1717 | | 1823 | |
| 1718 | test "zig fmt: if condition has line break but must not wrap (no fn call comma)" { | 1824 | test "zig fmt: if condition has line break but must not wrap (no fn call comma)" { |
| | 1825 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1826 | |
| 1719 | try testCanonical( | 1827 | try testCanonical( |
| 1720 | \\comptime { | 1828 | \\comptime { |
| 1721 | \\ if (self.user_input_options.put(name, UserInputOption{ | 1829 | \\ if (self.user_input_options.put(name, UserInputOption{ |
| ... | @@ -1737,6 +1845,8 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)" | ... | @@ -1737,6 +1845,8 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)" |
| 1737 | } | 1845 | } |
| 1738 | | 1846 | |
| 1739 | test "zig fmt: function call with multiline argument" { | 1847 | test "zig fmt: function call with multiline argument" { |
| | 1848 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1849 | |
| 1740 | try testCanonical( | 1850 | try testCanonical( |
| 1741 | \\comptime { | 1851 | \\comptime { |
| 1742 | \\ self.user_input_options.put(name, UserInputOption{ | 1852 | \\ self.user_input_options.put(name, UserInputOption{ |
| ... | @@ -1749,6 +1859,8 @@ test "zig fmt: function call with multiline argument" { | ... | @@ -1749,6 +1859,8 @@ test "zig fmt: function call with multiline argument" { |
| 1749 | } | 1859 | } |
| 1750 | | 1860 | |
| 1751 | test "zig fmt: if-else with comment before else" { | 1861 | test "zig fmt: if-else with comment before else" { |
| | 1862 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1863 | |
| 1752 | try testCanonical( | 1864 | try testCanonical( |
| 1753 | \\comptime { | 1865 | \\comptime { |
| 1754 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan | 1866 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan |
| ... | @@ -1767,6 +1879,8 @@ test "zig fmt: if-else with comment before else" { | ... | @@ -1767,6 +1879,8 @@ test "zig fmt: if-else with comment before else" { |
| 1767 | } | 1879 | } |
| 1768 | | 1880 | |
| 1769 | test "zig fmt: if nested" { | 1881 | test "zig fmt: if nested" { |
| | 1882 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1883 | |
| 1770 | try testCanonical( | 1884 | try testCanonical( |
| 1771 | \\pub fn foo() void { | 1885 | \\pub fn foo() void { |
| 1772 | \\ return if ((aInt & bInt) >= 0) | 1886 | \\ return if ((aInt & bInt) >= 0) |
| ... | @@ -1790,6 +1904,8 @@ test "zig fmt: if nested" { | ... | @@ -1790,6 +1904,8 @@ test "zig fmt: if nested" { |
| 1790 | } | 1904 | } |
| 1791 | | 1905 | |
| 1792 | test "zig fmt: respect line breaks in if-else" { | 1906 | test "zig fmt: respect line breaks in if-else" { |
| | 1907 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1908 | |
| 1793 | try testCanonical( | 1909 | try testCanonical( |
| 1794 | \\comptime { | 1910 | \\comptime { |
| 1795 | \\ return if (cond) a else b; | 1911 | \\ return if (cond) a else b; |
| ... | @@ -1809,6 +1925,8 @@ test "zig fmt: respect line breaks in if-else" { | ... | @@ -1809,6 +1925,8 @@ test "zig fmt: respect line breaks in if-else" { |
| 1809 | } | 1925 | } |
| 1810 | | 1926 | |
| 1811 | test "zig fmt: respect line breaks after infix operators" { | 1927 | test "zig fmt: respect line breaks after infix operators" { |
| | 1928 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1929 | |
| 1812 | try testCanonical( | 1930 | try testCanonical( |
| 1813 | \\comptime { | 1931 | \\comptime { |
| 1814 | \\ self.crc = | 1932 | \\ self.crc = |
| ... | @@ -1872,6 +1990,8 @@ test "zig fmt: switch comment after prong" { | ... | @@ -1872,6 +1990,8 @@ test "zig fmt: switch comment after prong" { |
| 1872 | } | 1990 | } |
| 1873 | | 1991 | |
| 1874 | test "zig fmt: struct literal no trailing comma" { | 1992 | test "zig fmt: struct literal no trailing comma" { |
| | 1993 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 1994 | |
| 1875 | try testTransform( | 1995 | try testTransform( |
| 1876 | \\const a = foo{ .x = 1, .y = 2 }; | 1996 | \\const a = foo{ .x = 1, .y = 2 }; |
| 1877 | \\const a = foo{ .x = 1, | 1997 | \\const a = foo{ .x = 1, |
| ... | @@ -1890,6 +2010,8 @@ test "zig fmt: struct literal no trailing comma" { | ... | @@ -1890,6 +2010,8 @@ test "zig fmt: struct literal no trailing comma" { |
| 1890 | } | 2010 | } |
| 1891 | | 2011 | |
| 1892 | test "zig fmt: struct literal containing a multiline expression" { | 2012 | test "zig fmt: struct literal containing a multiline expression" { |
| | 2013 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2014 | |
| 1893 | try testTransform( | 2015 | try testTransform( |
| 1894 | \\const a = A{ .x = if (f1()) 10 else 20 }; | 2016 | \\const a = A{ .x = if (f1()) 10 else 20 }; |
| 1895 | \\const a = A{ .x = if (f1()) 10 else 20, }; | 2017 | \\const a = A{ .x = if (f1()) 10 else 20, }; |
| ... | @@ -1951,6 +2073,8 @@ test "zig fmt: struct literal containing a multiline expression" { | ... | @@ -1951,6 +2073,8 @@ test "zig fmt: struct literal containing a multiline expression" { |
| 1951 | } | 2073 | } |
| 1952 | | 2074 | |
| 1953 | test "zig fmt: array literal with hint" { | 2075 | test "zig fmt: array literal with hint" { |
| | 2076 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2077 | |
| 1954 | try testTransform( | 2078 | try testTransform( |
| 1955 | \\const a = []u8{ | 2079 | \\const a = []u8{ |
| 1956 | \\ 1, 2, // | 2080 | \\ 1, 2, // |
| ... | @@ -2028,6 +2152,8 @@ test "zig fmt: array literal with hint" { | ... | @@ -2028,6 +2152,8 @@ test "zig fmt: array literal with hint" { |
| 2028 | } | 2152 | } |
| 2029 | | 2153 | |
| 2030 | test "zig fmt: array literal vertical column alignment" { | 2154 | test "zig fmt: array literal vertical column alignment" { |
| | 2155 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2156 | |
| 2031 | try testTransform( | 2157 | try testTransform( |
| 2032 | \\const a = []u8{ | 2158 | \\const a = []u8{ |
| 2033 | \\ 1000, 200, | 2159 | \\ 1000, 200, |
| ... | @@ -2075,6 +2201,8 @@ test "zig fmt: array literal vertical column alignment" { | ... | @@ -2075,6 +2201,8 @@ test "zig fmt: array literal vertical column alignment" { |
| 2075 | } | 2201 | } |
| 2076 | | 2202 | |
| 2077 | test "zig fmt: multiline string with backslash at end of line" { | 2203 | test "zig fmt: multiline string with backslash at end of line" { |
| | 2204 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2205 | |
| 2078 | try testCanonical( | 2206 | try testCanonical( |
| 2079 | \\comptime { | 2207 | \\comptime { |
| 2080 | \\ err( | 2208 | \\ err( |
| ... | @@ -2086,6 +2214,8 @@ test "zig fmt: multiline string with backslash at end of line" { | ... | @@ -2086,6 +2214,8 @@ test "zig fmt: multiline string with backslash at end of line" { |
| 2086 | } | 2214 | } |
| 2087 | | 2215 | |
| 2088 | test "zig fmt: multiline string parameter in fn call with trailing comma" { | 2216 | test "zig fmt: multiline string parameter in fn call with trailing comma" { |
| | 2217 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2218 | |
| 2089 | try testCanonical( | 2219 | try testCanonical( |
| 2090 | \\fn foo() void { | 2220 | \\fn foo() void { |
| 2091 | \\ try stdout.print( | 2221 | \\ try stdout.print( |
| ... | @@ -2104,6 +2234,8 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" { | ... | @@ -2104,6 +2234,8 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" { |
| 2104 | } | 2234 | } |
| 2105 | | 2235 | |
| 2106 | test "zig fmt: trailing comma on fn call" { | 2236 | test "zig fmt: trailing comma on fn call" { |
| | 2237 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2238 | |
| 2107 | try testCanonical( | 2239 | try testCanonical( |
| 2108 | \\comptime { | 2240 | \\comptime { |
| 2109 | \\ var module = try Module.create( | 2241 | \\ var module = try Module.create( |
| ... | @@ -2117,6 +2249,8 @@ test "zig fmt: trailing comma on fn call" { | ... | @@ -2117,6 +2249,8 @@ test "zig fmt: trailing comma on fn call" { |
| 2117 | } | 2249 | } |
| 2118 | | 2250 | |
| 2119 | test "zig fmt: multi line arguments without last comma" { | 2251 | test "zig fmt: multi line arguments without last comma" { |
| | 2252 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2253 | |
| 2120 | try testTransform( | 2254 | try testTransform( |
| 2121 | \\pub fn foo( | 2255 | \\pub fn foo( |
| 2122 | \\ a: usize, | 2256 | \\ a: usize, |
| ... | @@ -2178,6 +2312,8 @@ test "zig fmt: extra newlines at the end" { | ... | @@ -2178,6 +2312,8 @@ test "zig fmt: extra newlines at the end" { |
| 2178 | } | 2312 | } |
| 2179 | | 2313 | |
| 2180 | test "zig fmt: simple asm" { | 2314 | test "zig fmt: simple asm" { |
| | 2315 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2316 | |
| 2181 | try testTransform( | 2317 | try testTransform( |
| 2182 | \\comptime { | 2318 | \\comptime { |
| 2183 | \\ asm volatile ( | 2319 | \\ asm volatile ( |
| ... | @@ -2215,6 +2351,8 @@ test "zig fmt: simple asm" { | ... | @@ -2215,6 +2351,8 @@ test "zig fmt: simple asm" { |
| 2215 | } | 2351 | } |
| 2216 | | 2352 | |
| 2217 | test "zig fmt: nested struct literal with one item" { | 2353 | test "zig fmt: nested struct literal with one item" { |
| | 2354 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2355 | |
| 2218 | try testCanonical( | 2356 | try testCanonical( |
| 2219 | \\const a = foo{ | 2357 | \\const a = foo{ |
| 2220 | \\ .item = bar{ .a = b }, | 2358 | \\ .item = bar{ .a = b }, |
| ... | @@ -2258,6 +2396,8 @@ test "zig fmt: slice align" { | ... | @@ -2258,6 +2396,8 @@ test "zig fmt: slice align" { |
| 2258 | } | 2396 | } |
| 2259 | | 2397 | |
| 2260 | test "zig fmt: add trailing comma to array literal" { | 2398 | test "zig fmt: add trailing comma to array literal" { |
| | 2399 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2400 | |
| 2261 | try testTransform( | 2401 | try testTransform( |
| 2262 | \\comptime { | 2402 | \\comptime { |
| 2263 | \\ return []u16{'m', 's', 'y', 's', '-' // hi | 2403 | \\ return []u16{'m', 's', 'y', 's', '-' // hi |
| ... | @@ -2299,6 +2439,8 @@ test "zig fmt: line comment after doc comment" { | ... | @@ -2299,6 +2439,8 @@ test "zig fmt: line comment after doc comment" { |
| 2299 | } | 2439 | } |
| 2300 | | 2440 | |
| 2301 | test "zig fmt: bit field alignment" { | 2441 | test "zig fmt: bit field alignment" { |
| | 2442 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2443 | |
| 2302 | try testCanonical( | 2444 | try testCanonical( |
| 2303 | \\test { | 2445 | \\test { |
| 2304 | \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3); | 2446 | \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3); |
| ... | @@ -2330,6 +2472,8 @@ test "zig fmt: float literal with exponent" { | ... | @@ -2330,6 +2472,8 @@ test "zig fmt: float literal with exponent" { |
| 2330 | } | 2472 | } |
| 2331 | | 2473 | |
| 2332 | test "zig fmt: if-else end of comptime" { | 2474 | test "zig fmt: if-else end of comptime" { |
| | 2475 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2476 | |
| 2333 | try testCanonical( | 2477 | try testCanonical( |
| 2334 | \\comptime { | 2478 | \\comptime { |
| 2335 | \\ if (a) { | 2479 | \\ if (a) { |
| ... | @@ -2343,6 +2487,8 @@ test "zig fmt: if-else end of comptime" { | ... | @@ -2343,6 +2487,8 @@ test "zig fmt: if-else end of comptime" { |
| 2343 | } | 2487 | } |
| 2344 | | 2488 | |
| 2345 | test "zig fmt: nested blocks" { | 2489 | test "zig fmt: nested blocks" { |
| | 2490 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2491 | |
| 2346 | try testCanonical( | 2492 | try testCanonical( |
| 2347 | \\comptime { | 2493 | \\comptime { |
| 2348 | \\ { | 2494 | \\ { |
| ... | @@ -2358,6 +2504,8 @@ test "zig fmt: nested blocks" { | ... | @@ -2358,6 +2504,8 @@ test "zig fmt: nested blocks" { |
| 2358 | } | 2504 | } |
| 2359 | | 2505 | |
| 2360 | test "zig fmt: block with same line comment after end brace" { | 2506 | test "zig fmt: block with same line comment after end brace" { |
| | 2507 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2508 | |
| 2361 | try testCanonical( | 2509 | try testCanonical( |
| 2362 | \\comptime { | 2510 | \\comptime { |
| 2363 | \\ { | 2511 | \\ { |
| ... | @@ -2369,6 +2517,8 @@ test "zig fmt: block with same line comment after end brace" { | ... | @@ -2369,6 +2517,8 @@ test "zig fmt: block with same line comment after end brace" { |
| 2369 | } | 2517 | } |
| 2370 | | 2518 | |
| 2371 | test "zig fmt: statements with comment between" { | 2519 | test "zig fmt: statements with comment between" { |
| | 2520 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2521 | |
| 2372 | try testCanonical( | 2522 | try testCanonical( |
| 2373 | \\comptime { | 2523 | \\comptime { |
| 2374 | \\ a = b; | 2524 | \\ a = b; |
| ... | @@ -2380,6 +2530,8 @@ test "zig fmt: statements with comment between" { | ... | @@ -2380,6 +2530,8 @@ test "zig fmt: statements with comment between" { |
| 2380 | } | 2530 | } |
| 2381 | | 2531 | |
| 2382 | test "zig fmt: statements with empty line between" { | 2532 | test "zig fmt: statements with empty line between" { |
| | 2533 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2534 | |
| 2383 | try testCanonical( | 2535 | try testCanonical( |
| 2384 | \\comptime { | 2536 | \\comptime { |
| 2385 | \\ a = b; | 2537 | \\ a = b; |
| ... | @@ -2399,6 +2551,8 @@ test "zig fmt: ptr deref operator and unwrap optional operator" { | ... | @@ -2399,6 +2551,8 @@ test "zig fmt: ptr deref operator and unwrap optional operator" { |
| 2399 | } | 2551 | } |
| 2400 | | 2552 | |
| 2401 | test "zig fmt: comment after if before another if" { | 2553 | test "zig fmt: comment after if before another if" { |
| | 2554 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2555 | |
| 2402 | try testCanonical( | 2556 | try testCanonical( |
| 2403 | \\test "aoeu" { | 2557 | \\test "aoeu" { |
| 2404 | \\ // comment | 2558 | \\ // comment |
| ... | @@ -2421,6 +2575,8 @@ test "zig fmt: comment after if before another if" { | ... | @@ -2421,6 +2575,8 @@ test "zig fmt: comment after if before another if" { |
| 2421 | } | 2575 | } |
| 2422 | | 2576 | |
| 2423 | test "zig fmt: line comment between if block and else keyword" { | 2577 | test "zig fmt: line comment between if block and else keyword" { |
| | 2578 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2579 | |
| 2424 | try testCanonical( | 2580 | try testCanonical( |
| 2425 | \\test "aoeu" { | 2581 | \\test "aoeu" { |
| 2426 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan | 2582 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan |
| ... | @@ -2442,6 +2598,8 @@ test "zig fmt: line comment between if block and else keyword" { | ... | @@ -2442,6 +2598,8 @@ test "zig fmt: line comment between if block and else keyword" { |
| 2442 | } | 2598 | } |
| 2443 | | 2599 | |
| 2444 | test "zig fmt: same line comments in expression" { | 2600 | test "zig fmt: same line comments in expression" { |
| | 2601 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2602 | |
| 2445 | try testCanonical( | 2603 | try testCanonical( |
| 2446 | \\test "aoeu" { | 2604 | \\test "aoeu" { |
| 2447 | \\ const x = ( // a | 2605 | \\ const x = ( // a |
| ... | @@ -2482,6 +2640,8 @@ test "zig fmt: add comma on last switch prong" { | ... | @@ -2482,6 +2640,8 @@ test "zig fmt: add comma on last switch prong" { |
| 2482 | } | 2640 | } |
| 2483 | | 2641 | |
| 2484 | test "zig fmt: same-line comment after a statement" { | 2642 | test "zig fmt: same-line comment after a statement" { |
| | 2643 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2644 | |
| 2485 | try testCanonical( | 2645 | try testCanonical( |
| 2486 | \\test "" { | 2646 | \\test "" { |
| 2487 | \\ a = b; | 2647 | \\ a = b; |
| ... | @@ -2527,6 +2687,8 @@ test "zig fmt: same-line comment after switch prong" { | ... | @@ -2527,6 +2687,8 @@ test "zig fmt: same-line comment after switch prong" { |
| 2527 | } | 2687 | } |
| 2528 | | 2688 | |
| 2529 | test "zig fmt: same-line comment after non-block if expression" { | 2689 | test "zig fmt: same-line comment after non-block if expression" { |
| | 2690 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2691 | |
| 2530 | try testCanonical( | 2692 | try testCanonical( |
| 2531 | \\comptime { | 2693 | \\comptime { |
| 2532 | \\ if (sr > n_uword_bits - 1) // d > r | 2694 | \\ if (sr > n_uword_bits - 1) // d > r |
| ... | @@ -2537,6 +2699,8 @@ test "zig fmt: same-line comment after non-block if expression" { | ... | @@ -2537,6 +2699,8 @@ test "zig fmt: same-line comment after non-block if expression" { |
| 2537 | } | 2699 | } |
| 2538 | | 2700 | |
| 2539 | test "zig fmt: same-line comment on comptime expression" { | 2701 | test "zig fmt: same-line comment on comptime expression" { |
| | 2702 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2703 | |
| 2540 | try testCanonical( | 2704 | try testCanonical( |
| 2541 | \\test "" { | 2705 | \\test "" { |
| 2542 | \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt | 2706 | \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt |
| ... | @@ -2546,6 +2710,8 @@ test "zig fmt: same-line comment on comptime expression" { | ... | @@ -2546,6 +2710,8 @@ test "zig fmt: same-line comment on comptime expression" { |
| 2546 | } | 2710 | } |
| 2547 | | 2711 | |
| 2548 | test "zig fmt: switch with empty body" { | 2712 | test "zig fmt: switch with empty body" { |
| | 2713 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2714 | |
| 2549 | try testCanonical( | 2715 | try testCanonical( |
| 2550 | \\test "" { | 2716 | \\test "" { |
| 2551 | \\ foo() catch |err| switch (err) {}; | 2717 | \\ foo() catch |err| switch (err) {}; |
| ... | @@ -2555,6 +2721,8 @@ test "zig fmt: switch with empty body" { | ... | @@ -2555,6 +2721,8 @@ test "zig fmt: switch with empty body" { |
| 2555 | } | 2721 | } |
| 2556 | | 2722 | |
| 2557 | test "zig fmt: line comments in struct initializer" { | 2723 | test "zig fmt: line comments in struct initializer" { |
| | 2724 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2725 | |
| 2558 | try testCanonical( | 2726 | try testCanonical( |
| 2559 | \\fn foo() void { | 2727 | \\fn foo() void { |
| 2560 | \\ return Self{ | 2728 | \\ return Self{ |
| ... | @@ -2577,6 +2745,8 @@ test "zig fmt: line comments in struct initializer" { | ... | @@ -2577,6 +2745,8 @@ test "zig fmt: line comments in struct initializer" { |
| 2577 | } | 2745 | } |
| 2578 | | 2746 | |
| 2579 | test "zig fmt: first line comment in struct initializer" { | 2747 | test "zig fmt: first line comment in struct initializer" { |
| | 2748 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2749 | |
| 2580 | try testCanonical( | 2750 | try testCanonical( |
| 2581 | \\pub fn acquire(self: *Self) HeldLock { | 2751 | \\pub fn acquire(self: *Self) HeldLock { |
| 2582 | \\ return HeldLock{ | 2752 | \\ return HeldLock{ |
| ... | @@ -2645,6 +2815,8 @@ test "zig fmt: union(enum(u32)) with assigned enum values" { | ... | @@ -2645,6 +2815,8 @@ test "zig fmt: union(enum(u32)) with assigned enum values" { |
| 2645 | } | 2815 | } |
| 2646 | | 2816 | |
| 2647 | test "zig fmt: resume from suspend block" { | 2817 | test "zig fmt: resume from suspend block" { |
| | 2818 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2819 | |
| 2648 | try testCanonical( | 2820 | try testCanonical( |
| 2649 | \\fn foo() void { | 2821 | \\fn foo() void { |
| 2650 | \\ suspend { | 2822 | \\ suspend { |
| ... | @@ -2730,6 +2902,8 @@ test "zig fmt: comments before global variables" { | ... | @@ -2730,6 +2902,8 @@ test "zig fmt: comments before global variables" { |
| 2730 | } | 2902 | } |
| 2731 | | 2903 | |
| 2732 | test "zig fmt: comments in statements" { | 2904 | test "zig fmt: comments in statements" { |
| | 2905 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2906 | |
| 2733 | try testCanonical( | 2907 | try testCanonical( |
| 2734 | \\test "std" { | 2908 | \\test "std" { |
| 2735 | \\ // statement comment | 2909 | \\ // statement comment |
| ... | @@ -2757,6 +2931,8 @@ test "zig fmt: comments before test decl" { | ... | @@ -2757,6 +2931,8 @@ test "zig fmt: comments before test decl" { |
| 2757 | } | 2931 | } |
| 2758 | | 2932 | |
| 2759 | test "zig fmt: preserve spacing" { | 2933 | test "zig fmt: preserve spacing" { |
| | 2934 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 2935 | |
| 2760 | try testCanonical( | 2936 | try testCanonical( |
| 2761 | \\const std = @import("std"); | 2937 | \\const std = @import("std"); |
| 2762 | \\ | 2938 | \\ |
| ... | @@ -2825,6 +3001,8 @@ test "zig fmt: alignment" { | ... | @@ -2825,6 +3001,8 @@ test "zig fmt: alignment" { |
| 2825 | } | 3001 | } |
| 2826 | | 3002 | |
| 2827 | test "zig fmt: C main" { | 3003 | test "zig fmt: C main" { |
| | 3004 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3005 | |
| 2828 | try testCanonical( | 3006 | try testCanonical( |
| 2829 | \\fn main(argc: c_int, argv: **u8) c_int { | 3007 | \\fn main(argc: c_int, argv: **u8) c_int { |
| 2830 | \\ const a = b; | 3008 | \\ const a = b; |
| ... | @@ -2834,6 +3012,8 @@ test "zig fmt: C main" { | ... | @@ -2834,6 +3012,8 @@ test "zig fmt: C main" { |
| 2834 | } | 3012 | } |
| 2835 | | 3013 | |
| 2836 | test "zig fmt: return" { | 3014 | test "zig fmt: return" { |
| | 3015 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3016 | |
| 2837 | try testCanonical( | 3017 | try testCanonical( |
| 2838 | \\fn foo(argc: c_int, argv: **u8) c_int { | 3018 | \\fn foo(argc: c_int, argv: **u8) c_int { |
| 2839 | \\ return 0; | 3019 | \\ return 0; |
| ... | @@ -2896,6 +3076,8 @@ test "zig fmt: slice attributes" { | ... | @@ -2896,6 +3076,8 @@ test "zig fmt: slice attributes" { |
| 2896 | } | 3076 | } |
| 2897 | | 3077 | |
| 2898 | test "zig fmt: test declaration" { | 3078 | test "zig fmt: test declaration" { |
| | 3079 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3080 | |
| 2899 | try testCanonical( | 3081 | try testCanonical( |
| 2900 | \\test "test name" { | 3082 | \\test "test name" { |
| 2901 | \\ const a = 1; | 3083 | \\ const a = 1; |
| ... | @@ -2906,6 +3088,8 @@ test "zig fmt: test declaration" { | ... | @@ -2906,6 +3088,8 @@ test "zig fmt: test declaration" { |
| 2906 | } | 3088 | } |
| 2907 | | 3089 | |
| 2908 | test "zig fmt: infix operators" { | 3090 | test "zig fmt: infix operators" { |
| | 3091 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3092 | |
| 2909 | try testCanonical( | 3093 | try testCanonical( |
| 2910 | \\test { | 3094 | \\test { |
| 2911 | \\ var i = undefined; | 3095 | \\ var i = undefined; |
| ... | @@ -2958,6 +3142,8 @@ test "zig fmt: infix operators" { | ... | @@ -2958,6 +3142,8 @@ test "zig fmt: infix operators" { |
| 2958 | } | 3142 | } |
| 2959 | | 3143 | |
| 2960 | test "zig fmt: precedence" { | 3144 | test "zig fmt: precedence" { |
| | 3145 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3146 | |
| 2961 | try testCanonical( | 3147 | try testCanonical( |
| 2962 | \\test "precedence" { | 3148 | \\test "precedence" { |
| 2963 | \\ a!b(); | 3149 | \\ a!b(); |
| ... | @@ -2990,6 +3176,8 @@ test "zig fmt: precedence" { | ... | @@ -2990,6 +3176,8 @@ test "zig fmt: precedence" { |
| 2990 | } | 3176 | } |
| 2991 | | 3177 | |
| 2992 | test "zig fmt: prefix operators" { | 3178 | test "zig fmt: prefix operators" { |
| | 3179 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3180 | |
| 2993 | try testCanonical( | 3181 | try testCanonical( |
| 2994 | \\test "prefix operators" { | 3182 | \\test "prefix operators" { |
| 2995 | \\ try return --%~!&0; | 3183 | \\ try return --%~!&0; |
| ... | @@ -2999,6 +3187,8 @@ test "zig fmt: prefix operators" { | ... | @@ -2999,6 +3187,8 @@ test "zig fmt: prefix operators" { |
| 2999 | } | 3187 | } |
| 3000 | | 3188 | |
| 3001 | test "zig fmt: call expression" { | 3189 | test "zig fmt: call expression" { |
| | 3190 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3191 | |
| 3002 | try testCanonical( | 3192 | try testCanonical( |
| 3003 | \\test "test calls" { | 3193 | \\test "test calls" { |
| 3004 | \\ a(); | 3194 | \\ a(); |
| ... | @@ -3018,6 +3208,8 @@ test "zig fmt: anytype type" { | ... | @@ -3018,6 +3208,8 @@ test "zig fmt: anytype type" { |
| 3018 | } | 3208 | } |
| 3019 | | 3209 | |
| 3020 | test "zig fmt: functions" { | 3210 | test "zig fmt: functions" { |
| | 3211 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3212 | |
| 3021 | try testCanonical( | 3213 | try testCanonical( |
| 3022 | \\extern fn puts(s: *const u8) c_int; | 3214 | \\extern fn puts(s: *const u8) c_int; |
| 3023 | \\extern "c" fn puts(s: *const u8) c_int; | 3215 | \\extern "c" fn puts(s: *const u8) c_int; |
| ... | @@ -3042,6 +3234,8 @@ test "zig fmt: functions" { | ... | @@ -3042,6 +3234,8 @@ test "zig fmt: functions" { |
| 3042 | } | 3234 | } |
| 3043 | | 3235 | |
| 3044 | test "zig fmt: multiline string" { | 3236 | test "zig fmt: multiline string" { |
| | 3237 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3238 | |
| 3045 | try testCanonical( | 3239 | try testCanonical( |
| 3046 | \\test "" { | 3240 | \\test "" { |
| 3047 | \\ const s1 = | 3241 | \\ const s1 = |
| ... | @@ -3060,6 +3254,8 @@ test "zig fmt: multiline string" { | ... | @@ -3060,6 +3254,8 @@ test "zig fmt: multiline string" { |
| 3060 | } | 3254 | } |
| 3061 | | 3255 | |
| 3062 | test "zig fmt: values" { | 3256 | test "zig fmt: values" { |
| | 3257 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3258 | |
| 3063 | try testCanonical( | 3259 | try testCanonical( |
| 3064 | \\test "values" { | 3260 | \\test "values" { |
| 3065 | \\ 1; | 3261 | \\ 1; |
| ... | @@ -3079,6 +3275,8 @@ test "zig fmt: values" { | ... | @@ -3079,6 +3275,8 @@ test "zig fmt: values" { |
| 3079 | } | 3275 | } |
| 3080 | | 3276 | |
| 3081 | test "zig fmt: indexing" { | 3277 | test "zig fmt: indexing" { |
| | 3278 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3279 | |
| 3082 | try testCanonical( | 3280 | try testCanonical( |
| 3083 | \\test "test index" { | 3281 | \\test "test index" { |
| 3084 | \\ a[0]; | 3282 | \\ a[0]; |
| ... | @@ -3099,6 +3297,8 @@ test "zig fmt: indexing" { | ... | @@ -3099,6 +3297,8 @@ test "zig fmt: indexing" { |
| 3099 | } | 3297 | } |
| 3100 | | 3298 | |
| 3101 | test "zig fmt: struct declaration" { | 3299 | test "zig fmt: struct declaration" { |
| | 3300 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3301 | |
| 3102 | try testCanonical( | 3302 | try testCanonical( |
| 3103 | \\const S = struct { | 3303 | \\const S = struct { |
| 3104 | \\ const Self = @This(); | 3304 | \\ const Self = @This(); |
| ... | @@ -3205,6 +3405,8 @@ test "zig fmt: union declaration" { | ... | @@ -3205,6 +3405,8 @@ test "zig fmt: union declaration" { |
| 3205 | } | 3405 | } |
| 3206 | | 3406 | |
| 3207 | test "zig fmt: arrays" { | 3407 | test "zig fmt: arrays" { |
| | 3408 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3409 | |
| 3208 | try testCanonical( | 3410 | try testCanonical( |
| 3209 | \\test "test array" { | 3411 | \\test "test array" { |
| 3210 | \\ const a: [2]u8 = [2]u8{ | 3412 | \\ const a: [2]u8 = [2]u8{ |
| ... | @@ -3223,6 +3425,8 @@ test "zig fmt: arrays" { | ... | @@ -3223,6 +3425,8 @@ test "zig fmt: arrays" { |
| 3223 | } | 3425 | } |
| 3224 | | 3426 | |
| 3225 | test "zig fmt: container initializers" { | 3427 | test "zig fmt: container initializers" { |
| | 3428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3429 | |
| 3226 | try testCanonical( | 3430 | try testCanonical( |
| 3227 | \\const a0 = []u8{}; | 3431 | \\const a0 = []u8{}; |
| 3228 | \\const a1 = []u8{1}; | 3432 | \\const a1 = []u8{1}; |
| ... | @@ -3243,6 +3447,8 @@ test "zig fmt: container initializers" { | ... | @@ -3243,6 +3447,8 @@ test "zig fmt: container initializers" { |
| 3243 | } | 3447 | } |
| 3244 | | 3448 | |
| 3245 | test "zig fmt: catch" { | 3449 | test "zig fmt: catch" { |
| | 3450 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3451 | |
| 3246 | try testCanonical( | 3452 | try testCanonical( |
| 3247 | \\test "catch" { | 3453 | \\test "catch" { |
| 3248 | \\ const a: anyerror!u8 = 0; | 3454 | \\ const a: anyerror!u8 = 0; |
| ... | @@ -3258,6 +3464,8 @@ test "zig fmt: catch" { | ... | @@ -3258,6 +3464,8 @@ test "zig fmt: catch" { |
| 3258 | } | 3464 | } |
| 3259 | | 3465 | |
| 3260 | test "zig fmt: blocks" { | 3466 | test "zig fmt: blocks" { |
| | 3467 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3468 | |
| 3261 | try testCanonical( | 3469 | try testCanonical( |
| 3262 | \\test "blocks" { | 3470 | \\test "blocks" { |
| 3263 | \\ { | 3471 | \\ { |
| ... | @@ -3280,6 +3488,8 @@ test "zig fmt: blocks" { | ... | @@ -3280,6 +3488,8 @@ test "zig fmt: blocks" { |
| 3280 | } | 3488 | } |
| 3281 | | 3489 | |
| 3282 | test "zig fmt: switch" { | 3490 | test "zig fmt: switch" { |
| | 3491 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3492 | |
| 3283 | try testCanonical( | 3493 | try testCanonical( |
| 3284 | \\test "switch" { | 3494 | \\test "switch" { |
| 3285 | \\ switch (0) { | 3495 | \\ switch (0) { |
| ... | @@ -3335,6 +3545,8 @@ test "zig fmt: switch" { | ... | @@ -3335,6 +3545,8 @@ test "zig fmt: switch" { |
| 3335 | } | 3545 | } |
| 3336 | | 3546 | |
| 3337 | test "zig fmt: switch multiline string" { | 3547 | test "zig fmt: switch multiline string" { |
| | 3548 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3549 | |
| 3338 | try testCanonical( | 3550 | try testCanonical( |
| 3339 | \\test "switch multiline string" { | 3551 | \\test "switch multiline string" { |
| 3340 | \\ const x: u32 = 0; | 3552 | \\ const x: u32 = 0; |
| ... | @@ -3366,6 +3578,8 @@ test "zig fmt: switch multiline string" { | ... | @@ -3366,6 +3578,8 @@ test "zig fmt: switch multiline string" { |
| 3366 | } | 3578 | } |
| 3367 | | 3579 | |
| 3368 | test "zig fmt: while" { | 3580 | test "zig fmt: while" { |
| | 3581 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3582 | |
| 3369 | try testCanonical( | 3583 | try testCanonical( |
| 3370 | \\test "while" { | 3584 | \\test "while" { |
| 3371 | \\ while (10 < 1) unreachable; | 3585 | \\ while (10 < 1) unreachable; |
| ... | @@ -3441,6 +3655,8 @@ test "zig fmt: while" { | ... | @@ -3441,6 +3655,8 @@ test "zig fmt: while" { |
| 3441 | } | 3655 | } |
| 3442 | | 3656 | |
| 3443 | test "zig fmt: for" { | 3657 | test "zig fmt: for" { |
| | 3658 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3659 | |
| 3444 | try testCanonical( | 3660 | try testCanonical( |
| 3445 | \\test "for" { | 3661 | \\test "for" { |
| 3446 | \\ for (a) |v| { | 3662 | \\ for (a) |v| { |
| ... | @@ -3542,6 +3758,8 @@ test "zig fmt: for" { | ... | @@ -3542,6 +3758,8 @@ test "zig fmt: for" { |
| 3542 | } | 3758 | } |
| 3543 | | 3759 | |
| 3544 | test "zig fmt: for if" { | 3760 | test "zig fmt: for if" { |
| | 3761 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3762 | |
| 3545 | try testCanonical( | 3763 | try testCanonical( |
| 3546 | \\test { | 3764 | \\test { |
| 3547 | \\ for (a) |x| if (x) f(x); | 3765 | \\ for (a) |x| if (x) f(x); |
| ... | @@ -3567,6 +3785,8 @@ test "zig fmt: for if" { | ... | @@ -3567,6 +3785,8 @@ test "zig fmt: for if" { |
| 3567 | } | 3785 | } |
| 3568 | | 3786 | |
| 3569 | test "zig fmt: if for" { | 3787 | test "zig fmt: if for" { |
| | 3788 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3789 | |
| 3570 | try testCanonical( | 3790 | try testCanonical( |
| 3571 | \\test { | 3791 | \\test { |
| 3572 | \\ if (a) for (x) |x| f(x); | 3792 | \\ if (a) for (x) |x| f(x); |
| ... | @@ -3592,6 +3812,8 @@ test "zig fmt: if for" { | ... | @@ -3592,6 +3812,8 @@ test "zig fmt: if for" { |
| 3592 | } | 3812 | } |
| 3593 | | 3813 | |
| 3594 | test "zig fmt: while if" { | 3814 | test "zig fmt: while if" { |
| | 3815 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3816 | |
| 3595 | try testCanonical( | 3817 | try testCanonical( |
| 3596 | \\test { | 3818 | \\test { |
| 3597 | \\ while (a) if (x) f(x); | 3819 | \\ while (a) if (x) f(x); |
| ... | @@ -3617,6 +3839,8 @@ test "zig fmt: while if" { | ... | @@ -3617,6 +3839,8 @@ test "zig fmt: while if" { |
| 3617 | } | 3839 | } |
| 3618 | | 3840 | |
| 3619 | test "zig fmt: if while" { | 3841 | test "zig fmt: if while" { |
| | 3842 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3843 | |
| 3620 | try testCanonical( | 3844 | try testCanonical( |
| 3621 | \\test { | 3845 | \\test { |
| 3622 | \\ if (a) while (x) : (cont) f(x); | 3846 | \\ if (a) while (x) : (cont) f(x); |
| ... | @@ -3642,6 +3866,8 @@ test "zig fmt: if while" { | ... | @@ -3642,6 +3866,8 @@ test "zig fmt: if while" { |
| 3642 | } | 3866 | } |
| 3643 | | 3867 | |
| 3644 | test "zig fmt: while for" { | 3868 | test "zig fmt: while for" { |
| | 3869 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3870 | |
| 3645 | try testCanonical( | 3871 | try testCanonical( |
| 3646 | \\test { | 3872 | \\test { |
| 3647 | \\ while (a) for (x) |x| f(x); | 3873 | \\ while (a) for (x) |x| f(x); |
| ... | @@ -3667,6 +3893,8 @@ test "zig fmt: while for" { | ... | @@ -3667,6 +3893,8 @@ test "zig fmt: while for" { |
| 3667 | } | 3893 | } |
| 3668 | | 3894 | |
| 3669 | test "zig fmt: for while" { | 3895 | test "zig fmt: for while" { |
| | 3896 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3897 | |
| 3670 | try testCanonical( | 3898 | try testCanonical( |
| 3671 | \\test { | 3899 | \\test { |
| 3672 | \\ for (a) |a| while (x) |x| f(x); | 3900 | \\ for (a) |a| while (x) |x| f(x); |
| ... | @@ -3692,6 +3920,8 @@ test "zig fmt: for while" { | ... | @@ -3692,6 +3920,8 @@ test "zig fmt: for while" { |
| 3692 | } | 3920 | } |
| 3693 | | 3921 | |
| 3694 | test "zig fmt: if" { | 3922 | test "zig fmt: if" { |
| | 3923 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3924 | |
| 3695 | try testCanonical( | 3925 | try testCanonical( |
| 3696 | \\test "if" { | 3926 | \\test "if" { |
| 3697 | \\ if (10 < 0) { | 3927 | \\ if (10 < 0) { |
| ... | @@ -3741,6 +3971,8 @@ test "zig fmt: if" { | ... | @@ -3741,6 +3971,8 @@ test "zig fmt: if" { |
| 3741 | } | 3971 | } |
| 3742 | | 3972 | |
| 3743 | test "zig fmt: fix single statement if/for/while line breaks" { | 3973 | test "zig fmt: fix single statement if/for/while line breaks" { |
| | 3974 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 3975 | |
| 3744 | try testTransform( | 3976 | try testTransform( |
| 3745 | \\test { | 3977 | \\test { |
| 3746 | \\ if (cond) a | 3978 | \\ if (cond) a |
| ... | @@ -3793,6 +4025,8 @@ test "zig fmt: fix single statement if/for/while line breaks" { | ... | @@ -3793,6 +4025,8 @@ test "zig fmt: fix single statement if/for/while line breaks" { |
| 3793 | } | 4025 | } |
| 3794 | | 4026 | |
| 3795 | test "zig fmt: anon struct/array literal in if" { | 4027 | test "zig fmt: anon struct/array literal in if" { |
| | 4028 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4029 | |
| 3796 | try testCanonical( | 4030 | try testCanonical( |
| 3797 | \\test { | 4031 | \\test { |
| 3798 | \\ const a = if (cond) .{ | 4032 | \\ const a = if (cond) .{ |
| ... | @@ -3817,6 +4051,8 @@ test "zig fmt: anon struct/array literal in if" { | ... | @@ -3817,6 +4051,8 @@ test "zig fmt: anon struct/array literal in if" { |
| 3817 | } | 4051 | } |
| 3818 | | 4052 | |
| 3819 | test "zig fmt: defer" { | 4053 | test "zig fmt: defer" { |
| | 4054 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4055 | |
| 3820 | try testCanonical( | 4056 | try testCanonical( |
| 3821 | \\test "defer" { | 4057 | \\test "defer" { |
| 3822 | \\ var i: usize = 0; | 4058 | \\ var i: usize = 0; |
| ... | @@ -3837,6 +4073,8 @@ test "zig fmt: defer" { | ... | @@ -3837,6 +4073,8 @@ test "zig fmt: defer" { |
| 3837 | } | 4073 | } |
| 3838 | | 4074 | |
| 3839 | test "zig fmt: comptime" { | 4075 | test "zig fmt: comptime" { |
| | 4076 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4077 | |
| 3840 | try testCanonical( | 4078 | try testCanonical( |
| 3841 | \\fn a() u8 { | 4079 | \\fn a() u8 { |
| 3842 | \\ return 5; | 4080 | \\ return 5; |
| ... | @@ -3876,6 +4114,8 @@ test "zig fmt: comptime" { | ... | @@ -3876,6 +4114,8 @@ test "zig fmt: comptime" { |
| 3876 | } | 4114 | } |
| 3877 | | 4115 | |
| 3878 | test "zig fmt: fn type" { | 4116 | test "zig fmt: fn type" { |
| | 4117 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4118 | |
| 3879 | try testCanonical( | 4119 | try testCanonical( |
| 3880 | \\fn a(i: u8) u8 { | 4120 | \\fn a(i: u8) u8 { |
| 3881 | \\ return i + 1; | 4121 | \\ return i + 1; |
| ... | @@ -3889,6 +4129,8 @@ test "zig fmt: fn type" { | ... | @@ -3889,6 +4129,8 @@ test "zig fmt: fn type" { |
| 3889 | } | 4129 | } |
| 3890 | | 4130 | |
| 3891 | test "zig fmt: inline asm" { | 4131 | test "zig fmt: inline asm" { |
| | 4132 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4133 | |
| 3892 | try testCanonical( | 4134 | try testCanonical( |
| 3893 | \\pub fn syscall1(number: usize, arg1: usize) usize { | 4135 | \\pub fn syscall1(number: usize, arg1: usize) usize { |
| 3894 | \\ return asm volatile ("syscall" | 4136 | \\ return asm volatile ("syscall" |
| ... | @@ -3903,6 +4145,8 @@ test "zig fmt: inline asm" { | ... | @@ -3903,6 +4145,8 @@ test "zig fmt: inline asm" { |
| 3903 | } | 4145 | } |
| 3904 | | 4146 | |
| 3905 | test "zig fmt: async functions" { | 4147 | test "zig fmt: async functions" { |
| | 4148 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4149 | |
| 3906 | try testCanonical( | 4150 | try testCanonical( |
| 3907 | \\fn simpleAsyncFn() void { | 4151 | \\fn simpleAsyncFn() void { |
| 3908 | \\ const a = async a.b(); | 4152 | \\ const a = async a.b(); |
| ... | @@ -3931,6 +4175,8 @@ test "zig fmt: nosuspend" { | ... | @@ -3931,6 +4175,8 @@ test "zig fmt: nosuspend" { |
| 3931 | } | 4175 | } |
| 3932 | | 4176 | |
| 3933 | test "zig fmt: Block after if" { | 4177 | test "zig fmt: Block after if" { |
| | 4178 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4179 | |
| 3934 | try testCanonical( | 4180 | try testCanonical( |
| 3935 | \\test { | 4181 | \\test { |
| 3936 | \\ if (true) { | 4182 | \\ if (true) { |
| ... | @@ -3962,6 +4208,8 @@ test "zig fmt: string identifier" { | ... | @@ -3962,6 +4208,8 @@ test "zig fmt: string identifier" { |
| 3962 | } | 4208 | } |
| 3963 | | 4209 | |
| 3964 | test "zig fmt: error return" { | 4210 | test "zig fmt: error return" { |
| | 4211 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4212 | |
| 3965 | try testCanonical( | 4213 | try testCanonical( |
| 3966 | \\fn err() anyerror { | 4214 | \\fn err() anyerror { |
| 3967 | \\ call(); | 4215 | \\ call(); |
| ... | @@ -3972,6 +4220,8 @@ test "zig fmt: error return" { | ... | @@ -3972,6 +4220,8 @@ test "zig fmt: error return" { |
| 3972 | } | 4220 | } |
| 3973 | | 4221 | |
| 3974 | test "zig fmt: comptime block in container" { | 4222 | test "zig fmt: comptime block in container" { |
| | 4223 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4224 | |
| 3975 | try testCanonical( | 4225 | try testCanonical( |
| 3976 | \\pub fn container() type { | 4226 | \\pub fn container() type { |
| 3977 | \\ return struct { | 4227 | \\ return struct { |
| ... | @@ -3987,6 +4237,8 @@ test "zig fmt: comptime block in container" { | ... | @@ -3987,6 +4237,8 @@ test "zig fmt: comptime block in container" { |
| 3987 | } | 4237 | } |
| 3988 | | 4238 | |
| 3989 | test "zig fmt: inline asm parameter alignment" { | 4239 | test "zig fmt: inline asm parameter alignment" { |
| | 4240 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4241 | |
| 3990 | try testCanonical( | 4242 | try testCanonical( |
| 3991 | \\pub fn main() void { | 4243 | \\pub fn main() void { |
| 3992 | \\ asm volatile ( | 4244 | \\ asm volatile ( |
| ... | @@ -4025,6 +4277,8 @@ test "zig fmt: inline asm parameter alignment" { | ... | @@ -4025,6 +4277,8 @@ test "zig fmt: inline asm parameter alignment" { |
| 4025 | } | 4277 | } |
| 4026 | | 4278 | |
| 4027 | test "zig fmt: multiline string in array" { | 4279 | test "zig fmt: multiline string in array" { |
| | 4280 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4281 | |
| 4028 | try testCanonical( | 4282 | try testCanonical( |
| 4029 | \\const Foo = [][]const u8{ | 4283 | \\const Foo = [][]const u8{ |
| 4030 | \\ \\aaa | 4284 | \\ \\aaa |
| ... | @@ -4050,6 +4304,8 @@ test "zig fmt: multiline string in array" { | ... | @@ -4050,6 +4304,8 @@ test "zig fmt: multiline string in array" { |
| 4050 | } | 4304 | } |
| 4051 | | 4305 | |
| 4052 | test "zig fmt: if type expr" { | 4306 | test "zig fmt: if type expr" { |
| | 4307 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4308 | |
| 4053 | try testCanonical( | 4309 | try testCanonical( |
| 4054 | \\const mycond = true; | 4310 | \\const mycond = true; |
| 4055 | \\pub fn foo() if (mycond) i32 else void { | 4311 | \\pub fn foo() if (mycond) i32 else void { |
| ... | @@ -4078,6 +4334,8 @@ test "zig fmt: comment after empty comment" { | ... | @@ -4078,6 +4334,8 @@ test "zig fmt: comment after empty comment" { |
| 4078 | } | 4334 | } |
| 4079 | | 4335 | |
| 4080 | test "zig fmt: line comment in array" { | 4336 | test "zig fmt: line comment in array" { |
| | 4337 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4338 | |
| 4081 | try testTransform( | 4339 | try testTransform( |
| 4082 | \\test "a" { | 4340 | \\test "a" { |
| 4083 | \\ var arr = [_]u32{ | 4341 | \\ var arr = [_]u32{ |
| ... | @@ -4136,6 +4394,8 @@ test "zig fmt: comment after params" { | ... | @@ -4136,6 +4394,8 @@ test "zig fmt: comment after params" { |
| 4136 | } | 4394 | } |
| 4137 | | 4395 | |
| 4138 | test "zig fmt: comment in array initializer/access" { | 4396 | test "zig fmt: comment in array initializer/access" { |
| | 4397 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4398 | |
| 4139 | try testCanonical( | 4399 | try testCanonical( |
| 4140 | \\test "a" { | 4400 | \\test "a" { |
| 4141 | \\ var a = x{ //aa | 4401 | \\ var a = x{ //aa |
| ... | @@ -4172,6 +4432,8 @@ test "zig fmt: comment in array initializer/access" { | ... | @@ -4172,6 +4432,8 @@ test "zig fmt: comment in array initializer/access" { |
| 4172 | } | 4432 | } |
| 4173 | | 4433 | |
| 4174 | test "zig fmt: comments at several places in struct init" { | 4434 | test "zig fmt: comments at several places in struct init" { |
| | 4435 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4436 | |
| 4175 | try testTransform( | 4437 | try testTransform( |
| 4176 | \\var bar = Bar{ | 4438 | \\var bar = Bar{ |
| 4177 | \\ .x = 10, // test | 4439 | \\ .x = 10, // test |
| ... | @@ -4395,6 +4657,8 @@ test "zig fmt: integer literals with underscore separators" { | ... | @@ -4395,6 +4657,8 @@ test "zig fmt: integer literals with underscore separators" { |
| 4395 | } | 4657 | } |
| 4396 | | 4658 | |
| 4397 | test "zig fmt: hex literals with underscore separators" { | 4659 | test "zig fmt: hex literals with underscore separators" { |
| | 4660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4661 | |
| 4398 | try testTransform( | 4662 | try testTransform( |
| 4399 | \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 { | 4663 | \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 { |
| 4400 | \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000; | 4664 | \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000; |
| ... | @@ -4418,6 +4682,8 @@ test "zig fmt: hex literals with underscore separators" { | ... | @@ -4418,6 +4682,8 @@ test "zig fmt: hex literals with underscore separators" { |
| 4418 | } | 4682 | } |
| 4419 | | 4683 | |
| 4420 | test "zig fmt: decimal float literals with underscore separators" { | 4684 | test "zig fmt: decimal float literals with underscore separators" { |
| | 4685 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4686 | |
| 4421 | try testTransform( | 4687 | try testTransform( |
| 4422 | \\pub fn main() void { | 4688 | \\pub fn main() void { |
| 4423 | \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4; | 4689 | \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4; |
| ... | @@ -4435,6 +4701,8 @@ test "zig fmt: decimal float literals with underscore separators" { | ... | @@ -4435,6 +4701,8 @@ test "zig fmt: decimal float literals with underscore separators" { |
| 4435 | } | 4701 | } |
| 4436 | | 4702 | |
| 4437 | test "zig fmt: hexadeciaml float literals with underscore separators" { | 4703 | test "zig fmt: hexadeciaml float literals with underscore separators" { |
| | 4704 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4705 | |
| 4438 | try testTransform( | 4706 | try testTransform( |
| 4439 | \\pub fn main() void { | 4707 | \\pub fn main() void { |
| 4440 | \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16; | 4708 | \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16; |
| ... | @@ -4459,6 +4727,8 @@ test "zig fmt: C var args" { | ... | @@ -4459,6 +4727,8 @@ test "zig fmt: C var args" { |
| 4459 | } | 4727 | } |
| 4460 | | 4728 | |
| 4461 | test "zig fmt: Only indent multiline string literals in function calls" { | 4729 | test "zig fmt: Only indent multiline string literals in function calls" { |
| | 4730 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4731 | |
| 4462 | try testCanonical( | 4732 | try testCanonical( |
| 4463 | \\test "zig fmt:" { | 4733 | \\test "zig fmt:" { |
| 4464 | \\ try testTransform( | 4734 | \\ try testTransform( |
| ... | @@ -4476,6 +4746,8 @@ test "zig fmt: Only indent multiline string literals in function calls" { | ... | @@ -4476,6 +4746,8 @@ test "zig fmt: Only indent multiline string literals in function calls" { |
| 4476 | } | 4746 | } |
| 4477 | | 4747 | |
| 4478 | test "zig fmt: Don't add extra newline after if" { | 4748 | test "zig fmt: Don't add extra newline after if" { |
| | 4749 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4750 | |
| 4479 | try testCanonical( | 4751 | try testCanonical( |
| 4480 | \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void { | 4752 | \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void { |
| 4481 | \\ if (cwd().symLink(existing_path, new_path, .{})) { | 4753 | \\ if (cwd().symLink(existing_path, new_path, .{})) { |
| ... | @@ -4487,6 +4759,8 @@ test "zig fmt: Don't add extra newline after if" { | ... | @@ -4487,6 +4759,8 @@ test "zig fmt: Don't add extra newline after if" { |
| 4487 | } | 4759 | } |
| 4488 | | 4760 | |
| 4489 | test "zig fmt: comments in ternary ifs" { | 4761 | test "zig fmt: comments in ternary ifs" { |
| | 4762 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4763 | |
| 4490 | try testCanonical( | 4764 | try testCanonical( |
| 4491 | \\const x = if (true) { | 4765 | \\const x = if (true) { |
| 4492 | \\ 1; | 4766 | \\ 1; |
| ... | @@ -4506,6 +4780,8 @@ test "zig fmt: comments in ternary ifs" { | ... | @@ -4506,6 +4780,8 @@ test "zig fmt: comments in ternary ifs" { |
| 4506 | } | 4780 | } |
| 4507 | | 4781 | |
| 4508 | test "zig fmt: while statement in blockless if" { | 4782 | test "zig fmt: while statement in blockless if" { |
| | 4783 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4784 | |
| 4509 | try testCanonical( | 4785 | try testCanonical( |
| 4510 | \\pub fn main() void { | 4786 | \\pub fn main() void { |
| 4511 | \\ const zoom_node = if (focused_node == layout_first) | 4787 | \\ const zoom_node = if (focused_node == layout_first) |
| ... | @@ -4555,6 +4831,8 @@ test "zig fmt: test comments in field access chain" { | ... | @@ -4555,6 +4831,8 @@ test "zig fmt: test comments in field access chain" { |
| 4555 | } | 4831 | } |
| 4556 | | 4832 | |
| 4557 | test "zig fmt: allow line break before field access" { | 4833 | test "zig fmt: allow line break before field access" { |
| | 4834 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4835 | |
| 4558 | try testCanonical( | 4836 | try testCanonical( |
| 4559 | \\test { | 4837 | \\test { |
| 4560 | \\ const w = foo.bar().zippy(zag).iguessthisisok(); | 4838 | \\ const w = foo.bar().zippy(zag).iguessthisisok(); |
| ... | @@ -4603,6 +4881,8 @@ test "zig fmt: allow line break before field access" { | ... | @@ -4603,6 +4881,8 @@ test "zig fmt: allow line break before field access" { |
| 4603 | } | 4881 | } |
| 4604 | | 4882 | |
| 4605 | test "zig fmt: Indent comma correctly after multiline string literals in arg list (trailing comma)" { | 4883 | test "zig fmt: Indent comma correctly after multiline string literals in arg list (trailing comma)" { |
| | 4884 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4885 | |
| 4606 | try testCanonical( | 4886 | try testCanonical( |
| 4607 | \\fn foo() void { | 4887 | \\fn foo() void { |
| 4608 | \\ z.display_message_dialog( | 4888 | \\ z.display_message_dialog( |
| ... | @@ -4628,6 +4908,8 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis | ... | @@ -4628,6 +4908,8 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis |
| 4628 | } | 4908 | } |
| 4629 | | 4909 | |
| 4630 | test "zig fmt: Control flow statement as body of blockless if" { | 4910 | test "zig fmt: Control flow statement as body of blockless if" { |
| | 4911 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4912 | |
| 4631 | try testCanonical( | 4913 | try testCanonical( |
| 4632 | \\pub fn main() void { | 4914 | \\pub fn main() void { |
| 4633 | \\ const zoom_node = if (focused_node == layout_first) | 4915 | \\ const zoom_node = if (focused_node == layout_first) |
| ... | @@ -4663,6 +4945,8 @@ test "zig fmt: Control flow statement as body of blockless if" { | ... | @@ -4663,6 +4945,8 @@ test "zig fmt: Control flow statement as body of blockless if" { |
| 4663 | } | 4945 | } |
| 4664 | | 4946 | |
| 4665 | test "zig fmt: regression test for #5722" { | 4947 | test "zig fmt: regression test for #5722" { |
| | 4948 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4949 | |
| 4666 | try testCanonical( | 4950 | try testCanonical( |
| 4667 | \\pub fn sendViewTags(self: Self) void { | 4951 | \\pub fn sendViewTags(self: Self) void { |
| 4668 | \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32)); | 4952 | \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32)); |
| ... | @@ -4685,6 +4969,8 @@ test "zig fmt: regression test for #8974" { | ... | @@ -4685,6 +4969,8 @@ test "zig fmt: regression test for #8974" { |
| 4685 | } | 4969 | } |
| 4686 | | 4970 | |
| 4687 | test "zig fmt: allow trailing line comments to do manual array formatting" { | 4971 | test "zig fmt: allow trailing line comments to do manual array formatting" { |
| | 4972 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 4973 | |
| 4688 | try testCanonical( | 4974 | try testCanonical( |
| 4689 | \\fn foo() void { | 4975 | \\fn foo() void { |
| 4690 | \\ self.code.appendSliceAssumeCapacity(&[_]u8{ | 4976 | \\ self.code.appendSliceAssumeCapacity(&[_]u8{ |
| ... | @@ -4723,6 +5009,8 @@ test "zig fmt: allow trailing line comments to do manual array formatting" { | ... | @@ -4723,6 +5009,8 @@ test "zig fmt: allow trailing line comments to do manual array formatting" { |
| 4723 | } | 5009 | } |
| 4724 | | 5010 | |
| 4725 | test "zig fmt: multiline string literals should play nice with array initializers" { | 5011 | test "zig fmt: multiline string literals should play nice with array initializers" { |
| | 5012 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5013 | |
| 4726 | try testCanonical( | 5014 | try testCanonical( |
| 4727 | \\fn main() void { | 5015 | \\fn main() void { |
| 4728 | \\ var a = .{.{.{.{.{.{.{.{ | 5016 | \\ var a = .{.{.{.{.{.{.{.{ |
| ... | @@ -4789,6 +5077,8 @@ test "zig fmt: multiline string literals should play nice with array initializer | ... | @@ -4789,6 +5077,8 @@ test "zig fmt: multiline string literals should play nice with array initializer |
| 4789 | } | 5077 | } |
| 4790 | | 5078 | |
| 4791 | test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" { | 5079 | test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" { |
| | 5080 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5081 | |
| 4792 | try testCanonical( | 5082 | try testCanonical( |
| 4793 | \\pub fn makeMemUndefined(qzz: []u8) i1 { | 5083 | \\pub fn makeMemUndefined(qzz: []u8) i1 { |
| 4794 | \\ cases.add( // fixed bug foo | 5084 | \\ cases.add( // fixed bug foo |
| ... | @@ -4829,6 +5119,8 @@ test "zig fmt: use of comments and multiline string literals may force the param | ... | @@ -4829,6 +5119,8 @@ test "zig fmt: use of comments and multiline string literals may force the param |
| 4829 | } | 5119 | } |
| 4830 | | 5120 | |
| 4831 | test "zig fmt: single argument trailing commas in @builtins()" { | 5121 | test "zig fmt: single argument trailing commas in @builtins()" { |
| | 5122 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5123 | |
| 4832 | try testCanonical( | 5124 | try testCanonical( |
| 4833 | \\pub fn foo(qzz: []u8) i1 { | 5125 | \\pub fn foo(qzz: []u8) i1 { |
| 4834 | \\ @panic( | 5126 | \\ @panic( |
| ... | @@ -4862,6 +5154,8 @@ test "zig fmt: trailing comma should force multiline 1 column" { | ... | @@ -4862,6 +5154,8 @@ test "zig fmt: trailing comma should force multiline 1 column" { |
| 4862 | } | 5154 | } |
| 4863 | | 5155 | |
| 4864 | test "zig fmt: function params should align nicely" { | 5156 | test "zig fmt: function params should align nicely" { |
| | 5157 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5158 | |
| 4865 | try testCanonical( | 5159 | try testCanonical( |
| 4866 | \\pub fn foo() void { | 5160 | \\pub fn foo() void { |
| 4867 | \\ cases.addRuntimeSafety("slicing operator with sentinel", | 5161 | \\ cases.addRuntimeSafety("slicing operator with sentinel", |
| ... | @@ -4918,6 +5212,8 @@ test "zig fmt: remove trailing whitespace after doc comment" { | ... | @@ -4918,6 +5212,8 @@ test "zig fmt: remove trailing whitespace after doc comment" { |
| 4918 | } | 5212 | } |
| 4919 | | 5213 | |
| 4920 | test "zig fmt: for loop with ptr payload and index" { | 5214 | test "zig fmt: for loop with ptr payload and index" { |
| | 5215 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5216 | |
| 4921 | try testCanonical( | 5217 | try testCanonical( |
| 4922 | \\test { | 5218 | \\test { |
| 4923 | \\ for (self.entries.items, 0..) |*item, i| {} | 5219 | \\ for (self.entries.items, 0..) |*item, i| {} |
| ... | @@ -4930,6 +5226,8 @@ test "zig fmt: for loop with ptr payload and index" { | ... | @@ -4930,6 +5226,8 @@ test "zig fmt: for loop with ptr payload and index" { |
| 4930 | } | 5226 | } |
| 4931 | | 5227 | |
| 4932 | test "zig fmt: proper indent line comment after multi-line single expr while loop" { | 5228 | test "zig fmt: proper indent line comment after multi-line single expr while loop" { |
| | 5229 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5230 | |
| 4933 | try testCanonical( | 5231 | try testCanonical( |
| 4934 | \\test { | 5232 | \\test { |
| 4935 | \\ while (a) : (b) | 5233 | \\ while (a) : (b) |
| ... | @@ -4943,6 +5241,8 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo | ... | @@ -4943,6 +5241,8 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo |
| 4943 | } | 5241 | } |
| 4944 | | 5242 | |
| 4945 | test "zig fmt: function with labeled block as return type" { | 5243 | test "zig fmt: function with labeled block as return type" { |
| | 5244 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5245 | |
| 4946 | try testCanonical( | 5246 | try testCanonical( |
| 4947 | \\fn foo() t: { | 5247 | \\fn foo() t: { |
| 4948 | \\ break :t bar; | 5248 | \\ break :t bar; |
| ... | @@ -4965,6 +5265,8 @@ test "zig fmt: extern function with missing param name" { | ... | @@ -4965,6 +5265,8 @@ test "zig fmt: extern function with missing param name" { |
| 4965 | } | 5265 | } |
| 4966 | | 5266 | |
| 4967 | test "zig fmt: line comment after multiline single expr if statement with multiline string" { | 5267 | test "zig fmt: line comment after multiline single expr if statement with multiline string" { |
| | 5268 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5269 | |
| 4968 | try testCanonical( | 5270 | try testCanonical( |
| 4969 | \\test { | 5271 | \\test { |
| 4970 | \\ if (foo) | 5272 | \\ if (foo) |
| ... | @@ -4997,6 +5299,8 @@ test "zig fmt: line comment after multiline single expr if statement with multil | ... | @@ -4997,6 +5299,8 @@ test "zig fmt: line comment after multiline single expr if statement with multil |
| 4997 | } | 5299 | } |
| 4998 | | 5300 | |
| 4999 | test "zig fmt: respect extra newline between fn and pub usingnamespace" { | 5301 | test "zig fmt: respect extra newline between fn and pub usingnamespace" { |
| | 5302 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5303 | |
| 5000 | try testCanonical( | 5304 | try testCanonical( |
| 5001 | \\fn foo() void { | 5305 | \\fn foo() void { |
| 5002 | \\ bar(); | 5306 | \\ bar(); |
| ... | @@ -5121,6 +5425,8 @@ test "zig fmt: insert trailing comma if comments in array init" { | ... | @@ -5121,6 +5425,8 @@ test "zig fmt: insert trailing comma if comments in array init" { |
| 5121 | } | 5425 | } |
| 5122 | | 5426 | |
| 5123 | test "zig fmt: make single-line if no trailing comma" { | 5427 | test "zig fmt: make single-line if no trailing comma" { |
| | 5428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5429 | |
| 5124 | try testTransform( | 5430 | try testTransform( |
| 5125 | \\test "function call no trailing comma" { | 5431 | \\test "function call no trailing comma" { |
| 5126 | \\ foo( | 5432 | \\ foo( |
| ... | @@ -5300,6 +5606,8 @@ test "zig fmt: missing const/var before local variable" { | ... | @@ -5300,6 +5606,8 @@ test "zig fmt: missing const/var before local variable" { |
| 5300 | } | 5606 | } |
| 5301 | | 5607 | |
| 5302 | test "zig fmt: while continue expr" { | 5608 | test "zig fmt: while continue expr" { |
| | 5609 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5610 | |
| 5303 | try testCanonical( | 5611 | try testCanonical( |
| 5304 | \\test { | 5612 | \\test { |
| 5305 | \\ while (i > 0) | 5613 | \\ while (i > 0) |
| ... | @@ -5319,6 +5627,8 @@ test "zig fmt: while continue expr" { | ... | @@ -5319,6 +5627,8 @@ test "zig fmt: while continue expr" { |
| 5319 | } | 5627 | } |
| 5320 | | 5628 | |
| 5321 | test "zig fmt: canonicalize symbols (simple)" { | 5629 | test "zig fmt: canonicalize symbols (simple)" { |
| | 5630 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5631 | |
| 5322 | try testTransform( | 5632 | try testTransform( |
| 5323 | \\const val_normal: Normal = .{}; | 5633 | \\const val_normal: Normal = .{}; |
| 5324 | \\const @"val_unesc_me": @"UnescMe" = .{}; | 5634 | \\const @"val_unesc_me": @"UnescMe" = .{}; |
| ... | @@ -5468,6 +5778,8 @@ test "zig fmt: canonicalize symbols (simple)" { | ... | @@ -5468,6 +5778,8 @@ test "zig fmt: canonicalize symbols (simple)" { |
| 5468 | | 5778 | |
| 5469 | // Contextually unescape when shadowing primitive types and values. | 5779 | // Contextually unescape when shadowing primitive types and values. |
| 5470 | test "zig fmt: canonicalize symbols (primitive types)" { | 5780 | test "zig fmt: canonicalize symbols (primitive types)" { |
| | 5781 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5782 | |
| 5471 | try testTransform( | 5783 | try testTransform( |
| 5472 | \\const @"anyopaque" = struct { | 5784 | \\const @"anyopaque" = struct { |
| 5473 | \\ @"u8": @"type" = true, | 5785 | \\ @"u8": @"type" = true, |
| ... | @@ -5577,6 +5889,8 @@ test "zig fmt: canonicalize symbols (primitive types)" { | ... | @@ -5577,6 +5889,8 @@ test "zig fmt: canonicalize symbols (primitive types)" { |
| 5577 | | 5889 | |
| 5578 | // Never unescape names spelled like keywords. | 5890 | // Never unescape names spelled like keywords. |
| 5579 | test "zig fmt: canonicalize symbols (keywords)" { | 5891 | test "zig fmt: canonicalize symbols (keywords)" { |
| | 5892 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5893 | |
| 5580 | try testCanonical( | 5894 | try testCanonical( |
| 5581 | \\const @"enum" = struct { | 5895 | \\const @"enum" = struct { |
| 5582 | \\ @"error": @"struct" = true, | 5896 | \\ @"error": @"struct" = true, |
| ... | @@ -5604,6 +5918,8 @@ test "zig fmt: canonicalize symbols (keywords)" { | ... | @@ -5604,6 +5918,8 @@ test "zig fmt: canonicalize symbols (keywords)" { |
| 5604 | } | 5918 | } |
| 5605 | | 5919 | |
| 5606 | test "zig fmt: no space before newline before multiline string" { | 5920 | test "zig fmt: no space before newline before multiline string" { |
| | 5921 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5922 | |
| 5607 | try testCanonical( | 5923 | try testCanonical( |
| 5608 | \\const S = struct { | 5924 | \\const S = struct { |
| 5609 | \\ text: []const u8, | 5925 | \\ text: []const u8, |
| ... | @@ -5634,6 +5950,8 @@ test "zig fmt: no space before newline before multiline string" { | ... | @@ -5634,6 +5950,8 @@ test "zig fmt: no space before newline before multiline string" { |
| 5634 | | 5950 | |
| 5635 | // Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes. | 5951 | // Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes. |
| 5636 | test "zig fmt: canonicalize symbols (character escapes)" { | 5952 | test "zig fmt: canonicalize symbols (character escapes)" { |
| | 5953 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5954 | |
| 5637 | try testTransform( | 5955 | try testTransform( |
| 5638 | \\const @"\x46\x6f\x6f\x64" = struct { | 5956 | \\const @"\x46\x6f\x6f\x64" = struct { |
| 5639 | \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false, | 5957 | \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false, |
| ... | @@ -5676,6 +5994,8 @@ test "zig fmt: canonicalize symbols (character escapes)" { | ... | @@ -5676,6 +5994,8 @@ test "zig fmt: canonicalize symbols (character escapes)" { |
| 5676 | } | 5994 | } |
| 5677 | | 5995 | |
| 5678 | test "zig fmt: canonicalize symbols (asm)" { | 5996 | test "zig fmt: canonicalize symbols (asm)" { |
| | 5997 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; |
| | 5998 | |
| 5679 | try testTransform( | 5999 | try testTransform( |
| 5680 | \\test "asm" { | 6000 | \\test "asm" { |
| 5681 | \\ const @"null" = usize; | 6001 | \\ const @"null" = usize; |