| ... | @@ -26,8 +26,6 @@ test "zig fmt: tuple struct" { | ... | @@ -26,8 +26,6 @@ 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 | | | |
| 31 | try testCanonical( | 29 | try testCanonical( |
| 32 | \\fn foo() void { | 30 | \\fn foo() void { |
| 33 | \\ asm volatile ("" | 31 | \\ asm volatile ("" |
| ... | @@ -46,8 +44,6 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" { | ... | @@ -46,8 +44,6 @@ test "zig fmt: preserves clobbers in inline asm with stray comma" { |
| 46 | } | 44 | } |
| 47 | | 45 | |
| 48 | test "zig fmt: remove trailing comma at the end of assembly clobber" { | 46 | 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 | | | |
| 51 | try testTransform( | 47 | try testTransform( |
| 52 | \\fn foo() void { | 48 | \\fn foo() void { |
| 53 | \\ asm volatile ("" | 49 | \\ asm volatile ("" |
| ... | @@ -70,8 +66,6 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" { | ... | @@ -70,8 +66,6 @@ test "zig fmt: remove trailing comma at the end of assembly clobber" { |
| 70 | } | 66 | } |
| 71 | | 67 | |
| 72 | test "zig fmt: respect line breaks in struct field value declaration" { | 68 | test "zig fmt: respect line breaks in struct field value declaration" { |
| 73 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 74 | | | |
| 75 | try testCanonical( | 69 | try testCanonical( |
| 76 | \\const Foo = struct { | 70 | \\const Foo = struct { |
| 77 | \\ bar: u32 = | 71 | \\ bar: u32 = |
| ... | @@ -226,8 +220,6 @@ test "zig fmt: file ends in comment after var decl" { | ... | @@ -226,8 +220,6 @@ test "zig fmt: file ends in comment after var decl" { |
| 226 | } | 220 | } |
| 227 | | 221 | |
| 228 | test "zig fmt: if statement" { | 222 | test "zig fmt: if statement" { |
| 229 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 230 | | | |
| 231 | try testCanonical( | 223 | try testCanonical( |
| 232 | \\test "" { | 224 | \\test "" { |
| 233 | \\ if (optional()) |some| | 225 | \\ if (optional()) |some| |
| ... | @@ -326,8 +318,6 @@ test "zig fmt: decl between fields" { | ... | @@ -326,8 +318,6 @@ test "zig fmt: decl between fields" { |
| 326 | } | 318 | } |
| 327 | | 319 | |
| 328 | test "zig fmt: errdefer with payload" { | 320 | test "zig fmt: errdefer with payload" { |
| 329 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 330 | | | |
| 331 | try testCanonical( | 321 | try testCanonical( |
| 332 | \\pub fn main() anyerror!void { | 322 | \\pub fn main() anyerror!void { |
| 333 | \\ errdefer |a| x += 1; | 323 | \\ errdefer |a| x += 1; |
| ... | @@ -341,8 +331,6 @@ test "zig fmt: errdefer with payload" { | ... | @@ -341,8 +331,6 @@ test "zig fmt: errdefer with payload" { |
| 341 | } | 331 | } |
| 342 | | 332 | |
| 343 | test "zig fmt: nosuspend block" { | 333 | test "zig fmt: nosuspend block" { |
| 344 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 345 | | | |
| 346 | try testCanonical( | 334 | try testCanonical( |
| 347 | \\pub fn main() anyerror!void { | 335 | \\pub fn main() anyerror!void { |
| 348 | \\ nosuspend { | 336 | \\ nosuspend { |
| ... | @@ -354,8 +342,6 @@ test "zig fmt: nosuspend block" { | ... | @@ -354,8 +342,6 @@ test "zig fmt: nosuspend block" { |
| 354 | } | 342 | } |
| 355 | | 343 | |
| 356 | test "zig fmt: nosuspend await" { | 344 | test "zig fmt: nosuspend await" { |
| 357 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 358 | | | |
| 359 | try testCanonical( | 345 | try testCanonical( |
| 360 | \\fn foo() void { | 346 | \\fn foo() void { |
| 361 | \\ x = nosuspend await y; | 347 | \\ x = nosuspend await y; |
| ... | @@ -376,8 +362,6 @@ test "zig fmt: container declaration, single line" { | ... | @@ -376,8 +362,6 @@ test "zig fmt: container declaration, single line" { |
| 376 | } | 362 | } |
| 377 | | 363 | |
| 378 | test "zig fmt: container declaration, one item, multi line trailing comma" { | 364 | test "zig fmt: container declaration, one item, multi line trailing comma" { |
| 379 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 380 | | | |
| 381 | try testCanonical( | 365 | try testCanonical( |
| 382 | \\test "" { | 366 | \\test "" { |
| 383 | \\ comptime { | 367 | \\ comptime { |
| ... | @@ -391,8 +375,6 @@ test "zig fmt: container declaration, one item, multi line trailing comma" { | ... | @@ -391,8 +375,6 @@ test "zig fmt: container declaration, one item, multi line trailing comma" { |
| 391 | } | 375 | } |
| 392 | | 376 | |
| 393 | test "zig fmt: container declaration, no trailing comma on separate line" { | 377 | test "zig fmt: container declaration, no trailing comma on separate line" { |
| 394 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 395 | | | |
| 396 | try testTransform( | 378 | try testTransform( |
| 397 | \\test "" { | 379 | \\test "" { |
| 398 | \\ comptime { | 380 | \\ comptime { |
| ... | @@ -519,8 +501,6 @@ test "zig fmt: remove empty lines at start/end of container decl" { | ... | @@ -519,8 +501,6 @@ test "zig fmt: remove empty lines at start/end of container decl" { |
| 519 | } | 501 | } |
| 520 | | 502 | |
| 521 | test "zig fmt: remove empty lines at start/end of block" { | 503 | test "zig fmt: remove empty lines at start/end of block" { |
| 522 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 523 | | | |
| 524 | try testTransform( | 504 | try testTransform( |
| 525 | \\test { | 505 | \\test { |
| 526 | \\ | 506 | \\ |
| ... | @@ -541,8 +521,6 @@ test "zig fmt: remove empty lines at start/end of block" { | ... | @@ -541,8 +521,6 @@ test "zig fmt: remove empty lines at start/end of block" { |
| 541 | } | 521 | } |
| 542 | | 522 | |
| 543 | test "zig fmt: allow empty line before comment at start of block" { | 523 | 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 | | | |
| 546 | try testCanonical( | 524 | try testCanonical( |
| 547 | \\test { | 525 | \\test { |
| 548 | \\ | 526 | \\ |
| ... | @@ -606,8 +584,6 @@ test "zig fmt: comptime struct field" { | ... | @@ -606,8 +584,6 @@ test "zig fmt: comptime struct field" { |
| 606 | } | 584 | } |
| 607 | | 585 | |
| 608 | test "zig fmt: break from block" { | 586 | test "zig fmt: break from block" { |
| 609 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 610 | | | |
| 611 | try testCanonical( | 587 | try testCanonical( |
| 612 | \\const a = blk: { | 588 | \\const a = blk: { |
| 613 | \\ break :blk 42; | 589 | \\ break :blk 42; |
| ... | @@ -640,8 +616,6 @@ test "zig fmt: c pointer type" { | ... | @@ -640,8 +616,6 @@ test "zig fmt: c pointer type" { |
| 640 | } | 616 | } |
| 641 | | 617 | |
| 642 | test "zig fmt: builtin call with trailing comma" { | 618 | test "zig fmt: builtin call with trailing comma" { |
| 643 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 644 | | | |
| 645 | try testCanonical( | 619 | try testCanonical( |
| 646 | \\pub fn main() void { | 620 | \\pub fn main() void { |
| 647 | \\ @breakpoint(); | 621 | \\ @breakpoint(); |
| ... | @@ -657,8 +631,6 @@ test "zig fmt: builtin call with trailing comma" { | ... | @@ -657,8 +631,6 @@ test "zig fmt: builtin call with trailing comma" { |
| 657 | } | 631 | } |
| 658 | | 632 | |
| 659 | test "zig fmt: asm expression with comptime content" { | 633 | test "zig fmt: asm expression with comptime content" { |
| 660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 661 | | | |
| 662 | try testCanonical( | 634 | try testCanonical( |
| 663 | \\comptime { | 635 | \\comptime { |
| 664 | \\ asm ("foo" ++ "bar"); | 636 | \\ asm ("foo" ++ "bar"); |
| ... | @@ -683,8 +655,6 @@ test "zig fmt: asm expression with comptime content" { | ... | @@ -683,8 +655,6 @@ test "zig fmt: asm expression with comptime content" { |
| 683 | } | 655 | } |
| 684 | | 656 | |
| 685 | test "zig fmt: array types last token" { | 657 | test "zig fmt: array types last token" { |
| 686 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 687 | | | |
| 688 | try testCanonical( | 658 | try testCanonical( |
| 689 | \\test { | 659 | \\test { |
| 690 | \\ const x = [40]u32; | 660 | \\ const x = [40]u32; |
| ... | @@ -698,8 +668,6 @@ test "zig fmt: array types last token" { | ... | @@ -698,8 +668,6 @@ test "zig fmt: array types last token" { |
| 698 | } | 668 | } |
| 699 | | 669 | |
| 700 | test "zig fmt: sentinel-terminated array type" { | 670 | test "zig fmt: sentinel-terminated array type" { |
| 701 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 702 | | | |
| 703 | try testCanonical( | 671 | try testCanonical( |
| 704 | \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { | 672 | \\pub fn cStrToPrefixedFileW(s: [*:0]const u8) ![PATH_MAX_WIDE:0]u16 { |
| 705 | \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); | 673 | \\ return sliceToPrefixedFileW(mem.toSliceConst(u8, s)); |
| ... | @@ -709,8 +677,6 @@ test "zig fmt: sentinel-terminated array type" { | ... | @@ -709,8 +677,6 @@ test "zig fmt: sentinel-terminated array type" { |
| 709 | } | 677 | } |
| 710 | | 678 | |
| 711 | test "zig fmt: sentinel-terminated slice type" { | 679 | test "zig fmt: sentinel-terminated slice type" { |
| 712 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 713 | | | |
| 714 | try testCanonical( | 680 | try testCanonical( |
| 715 | \\pub fn toSlice(self: Buffer) [:0]u8 { | 681 | \\pub fn toSlice(self: Buffer) [:0]u8 { |
| 716 | \\ return self.list.toSlice()[0..self.len()]; | 682 | \\ return self.list.toSlice()[0..self.len()]; |
| ... | @@ -802,8 +768,6 @@ test "zig fmt: alignment in anonymous literal" { | ... | @@ -802,8 +768,6 @@ test "zig fmt: alignment in anonymous literal" { |
| 802 | } | 768 | } |
| 803 | | 769 | |
| 804 | test "zig fmt: anon struct literal 0 element" { | 770 | test "zig fmt: anon struct literal 0 element" { |
| 805 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 806 | | | |
| 807 | try testCanonical( | 771 | try testCanonical( |
| 808 | \\test { | 772 | \\test { |
| 809 | \\ const x = .{}; | 773 | \\ const x = .{}; |
| ... | @@ -813,8 +777,6 @@ test "zig fmt: anon struct literal 0 element" { | ... | @@ -813,8 +777,6 @@ test "zig fmt: anon struct literal 0 element" { |
| 813 | } | 777 | } |
| 814 | | 778 | |
| 815 | test "zig fmt: anon struct literal 1 element" { | 779 | test "zig fmt: anon struct literal 1 element" { |
| 816 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 817 | | | |
| 818 | try testCanonical( | 780 | try testCanonical( |
| 819 | \\test { | 781 | \\test { |
| 820 | \\ const x = .{ .a = b }; | 782 | \\ const x = .{ .a = b }; |
| ... | @@ -824,8 +786,6 @@ test "zig fmt: anon struct literal 1 element" { | ... | @@ -824,8 +786,6 @@ test "zig fmt: anon struct literal 1 element" { |
| 824 | } | 786 | } |
| 825 | | 787 | |
| 826 | test "zig fmt: anon struct literal 1 element comma" { | 788 | test "zig fmt: anon struct literal 1 element comma" { |
| 827 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 828 | | | |
| 829 | try testCanonical( | 789 | try testCanonical( |
| 830 | \\test { | 790 | \\test { |
| 831 | \\ const x = .{ | 791 | \\ const x = .{ |
| ... | @@ -837,8 +797,6 @@ test "zig fmt: anon struct literal 1 element comma" { | ... | @@ -837,8 +797,6 @@ test "zig fmt: anon struct literal 1 element comma" { |
| 837 | } | 797 | } |
| 838 | | 798 | |
| 839 | test "zig fmt: anon struct literal 2 element" { | 799 | test "zig fmt: anon struct literal 2 element" { |
| 840 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 841 | | | |
| 842 | try testCanonical( | 800 | try testCanonical( |
| 843 | \\test { | 801 | \\test { |
| 844 | \\ const x = .{ .a = b, .c = d }; | 802 | \\ const x = .{ .a = b, .c = d }; |
| ... | @@ -848,8 +806,6 @@ test "zig fmt: anon struct literal 2 element" { | ... | @@ -848,8 +806,6 @@ test "zig fmt: anon struct literal 2 element" { |
| 848 | } | 806 | } |
| 849 | | 807 | |
| 850 | test "zig fmt: anon struct literal 2 element comma" { | 808 | test "zig fmt: anon struct literal 2 element comma" { |
| 851 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 852 | | | |
| 853 | try testCanonical( | 809 | try testCanonical( |
| 854 | \\test { | 810 | \\test { |
| 855 | \\ const x = .{ | 811 | \\ const x = .{ |
| ... | @@ -862,8 +818,6 @@ test "zig fmt: anon struct literal 2 element comma" { | ... | @@ -862,8 +818,6 @@ test "zig fmt: anon struct literal 2 element comma" { |
| 862 | } | 818 | } |
| 863 | | 819 | |
| 864 | test "zig fmt: anon struct literal 3 element" { | 820 | test "zig fmt: anon struct literal 3 element" { |
| 865 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 866 | | | |
| 867 | try testCanonical( | 821 | try testCanonical( |
| 868 | \\test { | 822 | \\test { |
| 869 | \\ const x = .{ .a = b, .c = d, .e = f }; | 823 | \\ const x = .{ .a = b, .c = d, .e = f }; |
| ... | @@ -873,8 +827,6 @@ test "zig fmt: anon struct literal 3 element" { | ... | @@ -873,8 +827,6 @@ test "zig fmt: anon struct literal 3 element" { |
| 873 | } | 827 | } |
| 874 | | 828 | |
| 875 | test "zig fmt: anon struct literal 3 element comma" { | 829 | test "zig fmt: anon struct literal 3 element comma" { |
| 876 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 877 | | | |
| 878 | try testCanonical( | 830 | try testCanonical( |
| 879 | \\test { | 831 | \\test { |
| 880 | \\ const x = .{ | 832 | \\ const x = .{ |
| ... | @@ -888,8 +840,6 @@ test "zig fmt: anon struct literal 3 element comma" { | ... | @@ -888,8 +840,6 @@ test "zig fmt: anon struct literal 3 element comma" { |
| 888 | } | 840 | } |
| 889 | | 841 | |
| 890 | test "zig fmt: struct literal 0 element" { | 842 | test "zig fmt: struct literal 0 element" { |
| 891 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 892 | | | |
| 893 | try testCanonical( | 843 | try testCanonical( |
| 894 | \\test { | 844 | \\test { |
| 895 | \\ const x = X{}; | 845 | \\ const x = X{}; |
| ... | @@ -899,8 +849,6 @@ test "zig fmt: struct literal 0 element" { | ... | @@ -899,8 +849,6 @@ test "zig fmt: struct literal 0 element" { |
| 899 | } | 849 | } |
| 900 | | 850 | |
| 901 | test "zig fmt: struct literal 1 element" { | 851 | test "zig fmt: struct literal 1 element" { |
| 902 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 903 | | | |
| 904 | try testCanonical( | 852 | try testCanonical( |
| 905 | \\test { | 853 | \\test { |
| 906 | \\ const x = X{ .a = b }; | 854 | \\ const x = X{ .a = b }; |
| ... | @@ -910,8 +858,6 @@ test "zig fmt: struct literal 1 element" { | ... | @@ -910,8 +858,6 @@ test "zig fmt: struct literal 1 element" { |
| 910 | } | 858 | } |
| 911 | | 859 | |
| 912 | test "zig fmt: Unicode code point literal larger than u8" { | 860 | test "zig fmt: Unicode code point literal larger than u8" { |
| 913 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 914 | | | |
| 915 | try testCanonical( | 861 | try testCanonical( |
| 916 | \\test { | 862 | \\test { |
| 917 | \\ const x = X{ | 863 | \\ const x = X{ |
| ... | @@ -923,8 +869,6 @@ test "zig fmt: Unicode code point literal larger than u8" { | ... | @@ -923,8 +869,6 @@ test "zig fmt: Unicode code point literal larger than u8" { |
| 923 | } | 869 | } |
| 924 | | 870 | |
| 925 | test "zig fmt: struct literal 2 element" { | 871 | test "zig fmt: struct literal 2 element" { |
| 926 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 927 | | | |
| 928 | try testCanonical( | 872 | try testCanonical( |
| 929 | \\test { | 873 | \\test { |
| 930 | \\ const x = X{ .a = b, .c = d }; | 874 | \\ const x = X{ .a = b, .c = d }; |
| ... | @@ -934,8 +878,6 @@ test "zig fmt: struct literal 2 element" { | ... | @@ -934,8 +878,6 @@ test "zig fmt: struct literal 2 element" { |
| 934 | } | 878 | } |
| 935 | | 879 | |
| 936 | test "zig fmt: struct literal 2 element comma" { | 880 | test "zig fmt: struct literal 2 element comma" { |
| 937 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 938 | | | |
| 939 | try testCanonical( | 881 | try testCanonical( |
| 940 | \\test { | 882 | \\test { |
| 941 | \\ const x = X{ | 883 | \\ const x = X{ |
| ... | @@ -948,8 +890,6 @@ test "zig fmt: struct literal 2 element comma" { | ... | @@ -948,8 +890,6 @@ test "zig fmt: struct literal 2 element comma" { |
| 948 | } | 890 | } |
| 949 | | 891 | |
| 950 | test "zig fmt: struct literal 3 element" { | 892 | test "zig fmt: struct literal 3 element" { |
| 951 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 952 | | | |
| 953 | try testCanonical( | 893 | try testCanonical( |
| 954 | \\test { | 894 | \\test { |
| 955 | \\ const x = X{ .a = b, .c = d, .e = f }; | 895 | \\ const x = X{ .a = b, .c = d, .e = f }; |
| ... | @@ -959,8 +899,6 @@ test "zig fmt: struct literal 3 element" { | ... | @@ -959,8 +899,6 @@ test "zig fmt: struct literal 3 element" { |
| 959 | } | 899 | } |
| 960 | | 900 | |
| 961 | test "zig fmt: struct literal 3 element comma" { | 901 | test "zig fmt: struct literal 3 element comma" { |
| 962 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 963 | | | |
| 964 | try testCanonical( | 902 | try testCanonical( |
| 965 | \\test { | 903 | \\test { |
| 966 | \\ const x = X{ | 904 | \\ const x = X{ |
| ... | @@ -974,8 +912,6 @@ test "zig fmt: struct literal 3 element comma" { | ... | @@ -974,8 +912,6 @@ test "zig fmt: struct literal 3 element comma" { |
| 974 | } | 912 | } |
| 975 | | 913 | |
| 976 | test "zig fmt: anon list literal 1 element" { | 914 | test "zig fmt: anon list literal 1 element" { |
| 977 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 978 | | | |
| 979 | try testCanonical( | 915 | try testCanonical( |
| 980 | \\test { | 916 | \\test { |
| 981 | \\ const x = .{a}; | 917 | \\ const x = .{a}; |
| ... | @@ -996,8 +932,6 @@ test "zig fmt: anon list literal 1 element comma" { | ... | @@ -996,8 +932,6 @@ test "zig fmt: anon list literal 1 element comma" { |
| 996 | } | 932 | } |
| 997 | | 933 | |
| 998 | test "zig fmt: anon list literal 2 element" { | 934 | test "zig fmt: anon list literal 2 element" { |
| 999 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1000 | | | |
| 1001 | try testCanonical( | 935 | try testCanonical( |
| 1002 | \\test { | 936 | \\test { |
| 1003 | \\ const x = .{ a, b }; | 937 | \\ const x = .{ a, b }; |
| ... | @@ -1019,8 +953,6 @@ test "zig fmt: anon list literal 2 element comma" { | ... | @@ -1019,8 +953,6 @@ test "zig fmt: anon list literal 2 element comma" { |
| 1019 | } | 953 | } |
| 1020 | | 954 | |
| 1021 | test "zig fmt: anon list literal 3 element" { | 955 | test "zig fmt: anon list literal 3 element" { |
| 1022 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1023 | | | |
| 1024 | try testCanonical( | 956 | try testCanonical( |
| 1025 | \\test { | 957 | \\test { |
| 1026 | \\ const x = .{ a, b, c }; | 958 | \\ const x = .{ a, b, c }; |
| ... | @@ -1045,8 +977,6 @@ test "zig fmt: anon list literal 3 element comma" { | ... | @@ -1045,8 +977,6 @@ test "zig fmt: anon list literal 3 element comma" { |
| 1045 | } | 977 | } |
| 1046 | | 978 | |
| 1047 | test "zig fmt: array literal 0 element" { | 979 | test "zig fmt: array literal 0 element" { |
| 1048 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1049 | | | |
| 1050 | try testCanonical( | 980 | try testCanonical( |
| 1051 | \\test { | 981 | \\test { |
| 1052 | \\ const x = [_]u32{}; | 982 | \\ const x = [_]u32{}; |
| ... | @@ -1056,8 +986,6 @@ test "zig fmt: array literal 0 element" { | ... | @@ -1056,8 +986,6 @@ test "zig fmt: array literal 0 element" { |
| 1056 | } | 986 | } |
| 1057 | | 987 | |
| 1058 | test "zig fmt: array literal 1 element" { | 988 | test "zig fmt: array literal 1 element" { |
| 1059 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1060 | | | |
| 1061 | try testCanonical( | 989 | try testCanonical( |
| 1062 | \\test { | 990 | \\test { |
| 1063 | \\ const x = [_]u32{a}; | 991 | \\ const x = [_]u32{a}; |
| ... | @@ -1078,8 +1006,6 @@ test "zig fmt: array literal 1 element comma" { | ... | @@ -1078,8 +1006,6 @@ test "zig fmt: array literal 1 element comma" { |
| 1078 | } | 1006 | } |
| 1079 | | 1007 | |
| 1080 | test "zig fmt: array literal 2 element" { | 1008 | test "zig fmt: array literal 2 element" { |
| 1081 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1082 | | | |
| 1083 | try testCanonical( | 1009 | try testCanonical( |
| 1084 | \\test { | 1010 | \\test { |
| 1085 | \\ const x = [_]u32{ a, b }; | 1011 | \\ const x = [_]u32{ a, b }; |
| ... | @@ -1101,8 +1027,6 @@ test "zig fmt: array literal 2 element comma" { | ... | @@ -1101,8 +1027,6 @@ test "zig fmt: array literal 2 element comma" { |
| 1101 | } | 1027 | } |
| 1102 | | 1028 | |
| 1103 | test "zig fmt: array literal 3 element" { | 1029 | test "zig fmt: array literal 3 element" { |
| 1104 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1105 | | | |
| 1106 | try testCanonical( | 1030 | try testCanonical( |
| 1107 | \\test { | 1031 | \\test { |
| 1108 | \\ const x = [_]u32{ a, b, c }; | 1032 | \\ const x = [_]u32{ a, b, c }; |
| ... | @@ -1125,8 +1049,6 @@ test "zig fmt: array literal 3 element comma" { | ... | @@ -1125,8 +1049,6 @@ test "zig fmt: array literal 3 element comma" { |
| 1125 | } | 1049 | } |
| 1126 | | 1050 | |
| 1127 | test "zig fmt: sentinel array literal 1 element" { | 1051 | test "zig fmt: sentinel array literal 1 element" { |
| 1128 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1129 | | | |
| 1130 | try testCanonical( | 1052 | try testCanonical( |
| 1131 | \\test { | 1053 | \\test { |
| 1132 | \\ const x = [_:9000]u32{a}; | 1054 | \\ const x = [_:9000]u32{a}; |
| ... | @@ -1156,8 +1078,6 @@ test "zig fmt: slices with spaces in bounds" { | ... | @@ -1156,8 +1078,6 @@ test "zig fmt: slices with spaces in bounds" { |
| 1156 | } | 1078 | } |
| 1157 | | 1079 | |
| 1158 | test "zig fmt: block in slice expression" { | 1080 | test "zig fmt: block in slice expression" { |
| 1159 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1160 | | | |
| 1161 | try testCanonical( | 1081 | try testCanonical( |
| 1162 | \\const a = b[{ | 1082 | \\const a = b[{ |
| 1163 | \\ _ = x; | 1083 | \\ _ = x; |
| ... | @@ -1176,8 +1096,6 @@ test "zig fmt: block in slice expression" { | ... | @@ -1176,8 +1096,6 @@ test "zig fmt: block in slice expression" { |
| 1176 | } | 1096 | } |
| 1177 | | 1097 | |
| 1178 | test "zig fmt: async function" { | 1098 | test "zig fmt: async function" { |
| 1179 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1180 | | | |
| 1181 | try testCanonical( | 1099 | try testCanonical( |
| 1182 | \\pub const Server = struct { | 1100 | \\pub const Server = struct { |
| 1183 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void, | 1101 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void, |
| ... | @@ -1190,8 +1108,6 @@ test "zig fmt: async function" { | ... | @@ -1190,8 +1108,6 @@ test "zig fmt: async function" { |
| 1190 | } | 1108 | } |
| 1191 | | 1109 | |
| 1192 | test "zig fmt: whitespace fixes" { | 1110 | test "zig fmt: whitespace fixes" { |
| 1193 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1194 | | | |
| 1195 | try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", | 1111 | try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n", |
| 1196 | \\test "" { | 1112 | \\test "" { |
| 1197 | \\ const hi = x; | 1113 | \\ const hi = x; |
| ... | @@ -1204,8 +1120,6 @@ test "zig fmt: whitespace fixes" { | ... | @@ -1204,8 +1120,6 @@ test "zig fmt: whitespace fixes" { |
| 1204 | } | 1120 | } |
| 1205 | | 1121 | |
| 1206 | test "zig fmt: while else err prong with no block" { | 1122 | test "zig fmt: while else err prong with no block" { |
| 1207 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1208 | | | |
| 1209 | try testCanonical( | 1123 | try testCanonical( |
| 1210 | \\test "" { | 1124 | \\test "" { |
| 1211 | \\ const result = while (returnError()) |value| { | 1125 | \\ const result = while (returnError()) |value| { |
| ... | @@ -1235,8 +1149,6 @@ test "zig fmt: tagged union with enum values" { | ... | @@ -1235,8 +1149,6 @@ test "zig fmt: tagged union with enum values" { |
| 1235 | } | 1149 | } |
| 1236 | | 1150 | |
| 1237 | test "zig fmt: tagged union enum tag last token" { | 1151 | test "zig fmt: tagged union enum tag last token" { |
| 1238 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1239 | | | |
| 1240 | try testCanonical( | 1152 | try testCanonical( |
| 1241 | \\test { | 1153 | \\test { |
| 1242 | \\ const U = union(enum(u32)) {}; | 1154 | \\ const U = union(enum(u32)) {}; |
| ... | @@ -1572,8 +1484,6 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" { | ... | @@ -1572,8 +1484,6 @@ test "zig fmt: doc and line comment following 'zig fmt: on'" { |
| 1572 | } | 1484 | } |
| 1573 | | 1485 | |
| 1574 | test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { | 1486 | 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 | | | |
| 1577 | try testTransform( | 1487 | try testTransform( |
| 1578 | \\test "" { | 1488 | \\test "" { |
| 1579 | \\ const x = 42; | 1489 | \\ const x = 42; |
| ... | @@ -1600,8 +1510,6 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { | ... | @@ -1600,8 +1510,6 @@ test "zig fmt: 'zig fmt: (off|on)' works in the middle of code" { |
| 1600 | } | 1510 | } |
| 1601 | | 1511 | |
| 1602 | test "zig fmt: 'zig fmt: on' indentation is unchanged" { | 1512 | test "zig fmt: 'zig fmt: on' indentation is unchanged" { |
| 1603 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1604 | | | |
| 1605 | try testCanonical( | 1513 | try testCanonical( |
| 1606 | \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void { | 1514 | \\fn initOptionsAndLayouts(output: *Output, context: *Context) !void { |
| 1607 | \\ // zig fmt: off | 1515 | \\ // zig fmt: off |
| ... | @@ -1644,8 +1552,6 @@ test "zig fmt: spaces around slice operator" { | ... | @@ -1644,8 +1552,6 @@ test "zig fmt: spaces around slice operator" { |
| 1644 | } | 1552 | } |
| 1645 | | 1553 | |
| 1646 | test "zig fmt: async call in if condition" { | 1554 | test "zig fmt: async call in if condition" { |
| 1647 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1648 | | | |
| 1649 | try testCanonical( | 1555 | try testCanonical( |
| 1650 | \\comptime { | 1556 | \\comptime { |
| 1651 | \\ if (async b()) { | 1557 | \\ if (async b()) { |
| ... | @@ -1657,8 +1563,6 @@ test "zig fmt: async call in if condition" { | ... | @@ -1657,8 +1563,6 @@ test "zig fmt: async call in if condition" { |
| 1657 | } | 1563 | } |
| 1658 | | 1564 | |
| 1659 | test "zig fmt: 2nd arg multiline string" { | 1565 | test "zig fmt: 2nd arg multiline string" { |
| 1660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1661 | | | |
| 1662 | try testCanonical( | 1566 | try testCanonical( |
| 1663 | \\comptime { | 1567 | \\comptime { |
| 1664 | \\ cases.addAsm("hello world linux x86_64", | 1568 | \\ cases.addAsm("hello world linux x86_64", |
| ... | @@ -1687,8 +1591,6 @@ test "zig fmt: 2nd arg multiline string" { | ... | @@ -1687,8 +1591,6 @@ test "zig fmt: 2nd arg multiline string" { |
| 1687 | } | 1591 | } |
| 1688 | | 1592 | |
| 1689 | test "zig fmt: 2nd arg multiline string many args" { | 1593 | test "zig fmt: 2nd arg multiline string many args" { |
| 1690 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1691 | | | |
| 1692 | try testCanonical( | 1594 | try testCanonical( |
| 1693 | \\comptime { | 1595 | \\comptime { |
| 1694 | \\ cases.addAsm("hello world linux x86_64", | 1596 | \\ cases.addAsm("hello world linux x86_64", |
| ... | @@ -1700,8 +1602,6 @@ test "zig fmt: 2nd arg multiline string many args" { | ... | @@ -1700,8 +1602,6 @@ test "zig fmt: 2nd arg multiline string many args" { |
| 1700 | } | 1602 | } |
| 1701 | | 1603 | |
| 1702 | test "zig fmt: final arg multiline string" { | 1604 | test "zig fmt: final arg multiline string" { |
| 1703 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1704 | | | |
| 1705 | try testCanonical( | 1605 | try testCanonical( |
| 1706 | \\comptime { | 1606 | \\comptime { |
| 1707 | \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n", | 1607 | \\ cases.addAsm("hello world linux x86_64", "Hello, world!\n", |
| ... | @@ -1713,8 +1613,6 @@ test "zig fmt: final arg multiline string" { | ... | @@ -1713,8 +1613,6 @@ test "zig fmt: final arg multiline string" { |
| 1713 | } | 1613 | } |
| 1714 | | 1614 | |
| 1715 | test "zig fmt: if condition wraps" { | 1615 | test "zig fmt: if condition wraps" { |
| 1716 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1717 | | | |
| 1718 | try testTransform( | 1616 | try testTransform( |
| 1719 | \\comptime { | 1617 | \\comptime { |
| 1720 | \\ if (cond and | 1618 | \\ if (cond and |
| ... | @@ -1796,8 +1694,6 @@ test "zig fmt: if condition wraps" { | ... | @@ -1796,8 +1694,6 @@ test "zig fmt: if condition wraps" { |
| 1796 | } | 1694 | } |
| 1797 | | 1695 | |
| 1798 | test "zig fmt: if condition has line break but must not wrap" { | 1696 | 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 | | | |
| 1801 | try testCanonical( | 1697 | try testCanonical( |
| 1802 | \\comptime { | 1698 | \\comptime { |
| 1803 | \\ if (self.user_input_options.put( | 1699 | \\ if (self.user_input_options.put( |
| ... | @@ -1822,8 +1718,6 @@ test "zig fmt: if condition has line break but must not wrap" { | ... | @@ -1822,8 +1718,6 @@ test "zig fmt: if condition has line break but must not wrap" { |
| 1822 | } | 1718 | } |
| 1823 | | 1719 | |
| 1824 | test "zig fmt: if condition has line break but must not wrap (no fn call comma)" { | 1720 | 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 | | | |
| 1827 | try testCanonical( | 1721 | try testCanonical( |
| 1828 | \\comptime { | 1722 | \\comptime { |
| 1829 | \\ if (self.user_input_options.put(name, UserInputOption{ | 1723 | \\ if (self.user_input_options.put(name, UserInputOption{ |
| ... | @@ -1845,8 +1739,6 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)" | ... | @@ -1845,8 +1739,6 @@ test "zig fmt: if condition has line break but must not wrap (no fn call comma)" |
| 1845 | } | 1739 | } |
| 1846 | | 1740 | |
| 1847 | test "zig fmt: function call with multiline argument" { | 1741 | test "zig fmt: function call with multiline argument" { |
| 1848 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1849 | | | |
| 1850 | try testCanonical( | 1742 | try testCanonical( |
| 1851 | \\comptime { | 1743 | \\comptime { |
| 1852 | \\ self.user_input_options.put(name, UserInputOption{ | 1744 | \\ self.user_input_options.put(name, UserInputOption{ |
| ... | @@ -1859,8 +1751,6 @@ test "zig fmt: function call with multiline argument" { | ... | @@ -1859,8 +1751,6 @@ test "zig fmt: function call with multiline argument" { |
| 1859 | } | 1751 | } |
| 1860 | | 1752 | |
| 1861 | test "zig fmt: if-else with comment before else" { | 1753 | test "zig fmt: if-else with comment before else" { |
| 1862 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1863 | | | |
| 1864 | try testCanonical( | 1754 | try testCanonical( |
| 1865 | \\comptime { | 1755 | \\comptime { |
| 1866 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan | 1756 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan |
| ... | @@ -1879,8 +1769,6 @@ test "zig fmt: if-else with comment before else" { | ... | @@ -1879,8 +1769,6 @@ test "zig fmt: if-else with comment before else" { |
| 1879 | } | 1769 | } |
| 1880 | | 1770 | |
| 1881 | test "zig fmt: if nested" { | 1771 | test "zig fmt: if nested" { |
| 1882 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1883 | | | |
| 1884 | try testCanonical( | 1772 | try testCanonical( |
| 1885 | \\pub fn foo() void { | 1773 | \\pub fn foo() void { |
| 1886 | \\ return if ((aInt & bInt) >= 0) | 1774 | \\ return if ((aInt & bInt) >= 0) |
| ... | @@ -1904,8 +1792,6 @@ test "zig fmt: if nested" { | ... | @@ -1904,8 +1792,6 @@ test "zig fmt: if nested" { |
| 1904 | } | 1792 | } |
| 1905 | | 1793 | |
| 1906 | test "zig fmt: respect line breaks in if-else" { | 1794 | test "zig fmt: respect line breaks in if-else" { |
| 1907 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1908 | | | |
| 1909 | try testCanonical( | 1795 | try testCanonical( |
| 1910 | \\comptime { | 1796 | \\comptime { |
| 1911 | \\ return if (cond) a else b; | 1797 | \\ return if (cond) a else b; |
| ... | @@ -1925,8 +1811,6 @@ test "zig fmt: respect line breaks in if-else" { | ... | @@ -1925,8 +1811,6 @@ test "zig fmt: respect line breaks in if-else" { |
| 1925 | } | 1811 | } |
| 1926 | | 1812 | |
| 1927 | test "zig fmt: respect line breaks after infix operators" { | 1813 | test "zig fmt: respect line breaks after infix operators" { |
| 1928 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1929 | | | |
| 1930 | try testCanonical( | 1814 | try testCanonical( |
| 1931 | \\comptime { | 1815 | \\comptime { |
| 1932 | \\ self.crc = | 1816 | \\ self.crc = |
| ... | @@ -1990,8 +1874,6 @@ test "zig fmt: switch comment after prong" { | ... | @@ -1990,8 +1874,6 @@ test "zig fmt: switch comment after prong" { |
| 1990 | } | 1874 | } |
| 1991 | | 1875 | |
| 1992 | test "zig fmt: struct literal no trailing comma" { | 1876 | test "zig fmt: struct literal no trailing comma" { |
| 1993 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 1994 | | | |
| 1995 | try testTransform( | 1877 | try testTransform( |
| 1996 | \\const a = foo{ .x = 1, .y = 2 }; | 1878 | \\const a = foo{ .x = 1, .y = 2 }; |
| 1997 | \\const a = foo{ .x = 1, | 1879 | \\const a = foo{ .x = 1, |
| ... | @@ -2010,8 +1892,6 @@ test "zig fmt: struct literal no trailing comma" { | ... | @@ -2010,8 +1892,6 @@ test "zig fmt: struct literal no trailing comma" { |
| 2010 | } | 1892 | } |
| 2011 | | 1893 | |
| 2012 | test "zig fmt: struct literal containing a multiline expression" { | 1894 | test "zig fmt: struct literal containing a multiline expression" { |
| 2013 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2014 | | | |
| 2015 | try testTransform( | 1895 | try testTransform( |
| 2016 | \\const a = A{ .x = if (f1()) 10 else 20 }; | 1896 | \\const a = A{ .x = if (f1()) 10 else 20 }; |
| 2017 | \\const a = A{ .x = if (f1()) 10 else 20, }; | 1897 | \\const a = A{ .x = if (f1()) 10 else 20, }; |
| ... | @@ -2201,8 +2081,6 @@ test "zig fmt: array literal vertical column alignment" { | ... | @@ -2201,8 +2081,6 @@ test "zig fmt: array literal vertical column alignment" { |
| 2201 | } | 2081 | } |
| 2202 | | 2082 | |
| 2203 | test "zig fmt: multiline string with backslash at end of line" { | 2083 | test "zig fmt: multiline string with backslash at end of line" { |
| 2204 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2205 | | | |
| 2206 | try testCanonical( | 2084 | try testCanonical( |
| 2207 | \\comptime { | 2085 | \\comptime { |
| 2208 | \\ err( | 2086 | \\ err( |
| ... | @@ -2234,8 +2112,6 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" { | ... | @@ -2234,8 +2112,6 @@ test "zig fmt: multiline string parameter in fn call with trailing comma" { |
| 2234 | } | 2112 | } |
| 2235 | | 2113 | |
| 2236 | test "zig fmt: trailing comma on fn call" { | 2114 | test "zig fmt: trailing comma on fn call" { |
| 2237 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2238 | | | |
| 2239 | try testCanonical( | 2115 | try testCanonical( |
| 2240 | \\comptime { | 2116 | \\comptime { |
| 2241 | \\ var module = try Module.create( | 2117 | \\ var module = try Module.create( |
| ... | @@ -2249,8 +2125,6 @@ test "zig fmt: trailing comma on fn call" { | ... | @@ -2249,8 +2125,6 @@ test "zig fmt: trailing comma on fn call" { |
| 2249 | } | 2125 | } |
| 2250 | | 2126 | |
| 2251 | test "zig fmt: multi line arguments without last comma" { | 2127 | test "zig fmt: multi line arguments without last comma" { |
| 2252 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2253 | | | |
| 2254 | try testTransform( | 2128 | try testTransform( |
| 2255 | \\pub fn foo( | 2129 | \\pub fn foo( |
| 2256 | \\ a: usize, | 2130 | \\ a: usize, |
| ... | @@ -2312,8 +2186,6 @@ test "zig fmt: extra newlines at the end" { | ... | @@ -2312,8 +2186,6 @@ test "zig fmt: extra newlines at the end" { |
| 2312 | } | 2186 | } |
| 2313 | | 2187 | |
| 2314 | test "zig fmt: simple asm" { | 2188 | test "zig fmt: simple asm" { |
| 2315 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2316 | | | |
| 2317 | try testTransform( | 2189 | try testTransform( |
| 2318 | \\comptime { | 2190 | \\comptime { |
| 2319 | \\ asm volatile ( | 2191 | \\ asm volatile ( |
| ... | @@ -2351,8 +2223,6 @@ test "zig fmt: simple asm" { | ... | @@ -2351,8 +2223,6 @@ test "zig fmt: simple asm" { |
| 2351 | } | 2223 | } |
| 2352 | | 2224 | |
| 2353 | test "zig fmt: nested struct literal with one item" { | 2225 | test "zig fmt: nested struct literal with one item" { |
| 2354 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2355 | | | |
| 2356 | try testCanonical( | 2226 | try testCanonical( |
| 2357 | \\const a = foo{ | 2227 | \\const a = foo{ |
| 2358 | \\ .item = bar{ .a = b }, | 2228 | \\ .item = bar{ .a = b }, |
| ... | @@ -2439,8 +2309,6 @@ test "zig fmt: line comment after doc comment" { | ... | @@ -2439,8 +2309,6 @@ test "zig fmt: line comment after doc comment" { |
| 2439 | } | 2309 | } |
| 2440 | | 2310 | |
| 2441 | test "zig fmt: bit field alignment" { | 2311 | test "zig fmt: bit field alignment" { |
| 2442 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2443 | | | |
| 2444 | try testCanonical( | 2312 | try testCanonical( |
| 2445 | \\test { | 2313 | \\test { |
| 2446 | \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3); | 2314 | \\ assert(@TypeOf(&blah.b) == *align(1:3:6) const u3); |
| ... | @@ -2472,8 +2340,6 @@ test "zig fmt: float literal with exponent" { | ... | @@ -2472,8 +2340,6 @@ test "zig fmt: float literal with exponent" { |
| 2472 | } | 2340 | } |
| 2473 | | 2341 | |
| 2474 | test "zig fmt: if-else end of comptime" { | 2342 | test "zig fmt: if-else end of comptime" { |
| 2475 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2476 | | | |
| 2477 | try testCanonical( | 2343 | try testCanonical( |
| 2478 | \\comptime { | 2344 | \\comptime { |
| 2479 | \\ if (a) { | 2345 | \\ if (a) { |
| ... | @@ -2487,8 +2353,6 @@ test "zig fmt: if-else end of comptime" { | ... | @@ -2487,8 +2353,6 @@ test "zig fmt: if-else end of comptime" { |
| 2487 | } | 2353 | } |
| 2488 | | 2354 | |
| 2489 | test "zig fmt: nested blocks" { | 2355 | test "zig fmt: nested blocks" { |
| 2490 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2491 | | | |
| 2492 | try testCanonical( | 2356 | try testCanonical( |
| 2493 | \\comptime { | 2357 | \\comptime { |
| 2494 | \\ { | 2358 | \\ { |
| ... | @@ -2504,8 +2368,6 @@ test "zig fmt: nested blocks" { | ... | @@ -2504,8 +2368,6 @@ test "zig fmt: nested blocks" { |
| 2504 | } | 2368 | } |
| 2505 | | 2369 | |
| 2506 | test "zig fmt: block with same line comment after end brace" { | 2370 | test "zig fmt: block with same line comment after end brace" { |
| 2507 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2508 | | | |
| 2509 | try testCanonical( | 2371 | try testCanonical( |
| 2510 | \\comptime { | 2372 | \\comptime { |
| 2511 | \\ { | 2373 | \\ { |
| ... | @@ -2517,8 +2379,6 @@ test "zig fmt: block with same line comment after end brace" { | ... | @@ -2517,8 +2379,6 @@ test "zig fmt: block with same line comment after end brace" { |
| 2517 | } | 2379 | } |
| 2518 | | 2380 | |
| 2519 | test "zig fmt: statements with comment between" { | 2381 | test "zig fmt: statements with comment between" { |
| 2520 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2521 | | | |
| 2522 | try testCanonical( | 2382 | try testCanonical( |
| 2523 | \\comptime { | 2383 | \\comptime { |
| 2524 | \\ a = b; | 2384 | \\ a = b; |
| ... | @@ -2530,8 +2390,6 @@ test "zig fmt: statements with comment between" { | ... | @@ -2530,8 +2390,6 @@ test "zig fmt: statements with comment between" { |
| 2530 | } | 2390 | } |
| 2531 | | 2391 | |
| 2532 | test "zig fmt: statements with empty line between" { | 2392 | test "zig fmt: statements with empty line between" { |
| 2533 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2534 | | | |
| 2535 | try testCanonical( | 2393 | try testCanonical( |
| 2536 | \\comptime { | 2394 | \\comptime { |
| 2537 | \\ a = b; | 2395 | \\ a = b; |
| ... | @@ -2551,8 +2409,6 @@ test "zig fmt: ptr deref operator and unwrap optional operator" { | ... | @@ -2551,8 +2409,6 @@ test "zig fmt: ptr deref operator and unwrap optional operator" { |
| 2551 | } | 2409 | } |
| 2552 | | 2410 | |
| 2553 | test "zig fmt: comment after if before another if" { | 2411 | test "zig fmt: comment after if before another if" { |
| 2554 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2555 | | | |
| 2556 | try testCanonical( | 2412 | try testCanonical( |
| 2557 | \\test "aoeu" { | 2413 | \\test "aoeu" { |
| 2558 | \\ // comment | 2414 | \\ // comment |
| ... | @@ -2575,8 +2431,6 @@ test "zig fmt: comment after if before another if" { | ... | @@ -2575,8 +2431,6 @@ test "zig fmt: comment after if before another if" { |
| 2575 | } | 2431 | } |
| 2576 | | 2432 | |
| 2577 | test "zig fmt: line comment between if block and else keyword" { | 2433 | test "zig fmt: line comment between if block and else keyword" { |
| 2578 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2579 | | | |
| 2580 | try testCanonical( | 2434 | try testCanonical( |
| 2581 | \\test "aoeu" { | 2435 | \\test "aoeu" { |
| 2582 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan | 2436 | \\ // cexp(finite|nan +- i inf|nan) = nan + i nan |
| ... | @@ -2598,8 +2452,6 @@ test "zig fmt: line comment between if block and else keyword" { | ... | @@ -2598,8 +2452,6 @@ test "zig fmt: line comment between if block and else keyword" { |
| 2598 | } | 2452 | } |
| 2599 | | 2453 | |
| 2600 | test "zig fmt: same line comments in expression" { | 2454 | test "zig fmt: same line comments in expression" { |
| 2601 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2602 | | | |
| 2603 | try testCanonical( | 2455 | try testCanonical( |
| 2604 | \\test "aoeu" { | 2456 | \\test "aoeu" { |
| 2605 | \\ const x = ( // a | 2457 | \\ const x = ( // a |
| ... | @@ -2640,8 +2492,6 @@ test "zig fmt: add comma on last switch prong" { | ... | @@ -2640,8 +2492,6 @@ test "zig fmt: add comma on last switch prong" { |
| 2640 | } | 2492 | } |
| 2641 | | 2493 | |
| 2642 | test "zig fmt: same-line comment after a statement" { | 2494 | test "zig fmt: same-line comment after a statement" { |
| 2643 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2644 | | | |
| 2645 | try testCanonical( | 2495 | try testCanonical( |
| 2646 | \\test "" { | 2496 | \\test "" { |
| 2647 | \\ a = b; | 2497 | \\ a = b; |
| ... | @@ -2687,8 +2537,6 @@ test "zig fmt: same-line comment after switch prong" { | ... | @@ -2687,8 +2537,6 @@ test "zig fmt: same-line comment after switch prong" { |
| 2687 | } | 2537 | } |
| 2688 | | 2538 | |
| 2689 | test "zig fmt: same-line comment after non-block if expression" { | 2539 | test "zig fmt: same-line comment after non-block if expression" { |
| 2690 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2691 | | | |
| 2692 | try testCanonical( | 2540 | try testCanonical( |
| 2693 | \\comptime { | 2541 | \\comptime { |
| 2694 | \\ if (sr > n_uword_bits - 1) // d > r | 2542 | \\ if (sr > n_uword_bits - 1) // d > r |
| ... | @@ -2699,8 +2547,6 @@ test "zig fmt: same-line comment after non-block if expression" { | ... | @@ -2699,8 +2547,6 @@ test "zig fmt: same-line comment after non-block if expression" { |
| 2699 | } | 2547 | } |
| 2700 | | 2548 | |
| 2701 | test "zig fmt: same-line comment on comptime expression" { | 2549 | test "zig fmt: same-line comment on comptime expression" { |
| 2702 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2703 | | | |
| 2704 | try testCanonical( | 2550 | try testCanonical( |
| 2705 | \\test "" { | 2551 | \\test "" { |
| 2706 | \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt | 2552 | \\ comptime assert(@typeInfo(T) == .Int); // must pass an integer to absInt |
| ... | @@ -2710,8 +2556,6 @@ test "zig fmt: same-line comment on comptime expression" { | ... | @@ -2710,8 +2556,6 @@ test "zig fmt: same-line comment on comptime expression" { |
| 2710 | } | 2556 | } |
| 2711 | | 2557 | |
| 2712 | test "zig fmt: switch with empty body" { | 2558 | test "zig fmt: switch with empty body" { |
| 2713 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2714 | | | |
| 2715 | try testCanonical( | 2559 | try testCanonical( |
| 2716 | \\test "" { | 2560 | \\test "" { |
| 2717 | \\ foo() catch |err| switch (err) {}; | 2561 | \\ foo() catch |err| switch (err) {}; |
| ... | @@ -2721,8 +2565,6 @@ test "zig fmt: switch with empty body" { | ... | @@ -2721,8 +2565,6 @@ test "zig fmt: switch with empty body" { |
| 2721 | } | 2565 | } |
| 2722 | | 2566 | |
| 2723 | test "zig fmt: line comments in struct initializer" { | 2567 | test "zig fmt: line comments in struct initializer" { |
| 2724 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2725 | | | |
| 2726 | try testCanonical( | 2568 | try testCanonical( |
| 2727 | \\fn foo() void { | 2569 | \\fn foo() void { |
| 2728 | \\ return Self{ | 2570 | \\ return Self{ |
| ... | @@ -2745,8 +2587,6 @@ test "zig fmt: line comments in struct initializer" { | ... | @@ -2745,8 +2587,6 @@ test "zig fmt: line comments in struct initializer" { |
| 2745 | } | 2587 | } |
| 2746 | | 2588 | |
| 2747 | test "zig fmt: first line comment in struct initializer" { | 2589 | test "zig fmt: first line comment in struct initializer" { |
| 2748 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2749 | | | |
| 2750 | try testCanonical( | 2590 | try testCanonical( |
| 2751 | \\pub fn acquire(self: *Self) HeldLock { | 2591 | \\pub fn acquire(self: *Self) HeldLock { |
| 2752 | \\ return HeldLock{ | 2592 | \\ return HeldLock{ |
| ... | @@ -2815,8 +2655,6 @@ test "zig fmt: union(enum(u32)) with assigned enum values" { | ... | @@ -2815,8 +2655,6 @@ test "zig fmt: union(enum(u32)) with assigned enum values" { |
| 2815 | } | 2655 | } |
| 2816 | | 2656 | |
| 2817 | test "zig fmt: resume from suspend block" { | 2657 | test "zig fmt: resume from suspend block" { |
| 2818 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2819 | | | |
| 2820 | try testCanonical( | 2658 | try testCanonical( |
| 2821 | \\fn foo() void { | 2659 | \\fn foo() void { |
| 2822 | \\ suspend { | 2660 | \\ suspend { |
| ... | @@ -2902,8 +2740,6 @@ test "zig fmt: comments before global variables" { | ... | @@ -2902,8 +2740,6 @@ test "zig fmt: comments before global variables" { |
| 2902 | } | 2740 | } |
| 2903 | | 2741 | |
| 2904 | test "zig fmt: comments in statements" { | 2742 | test "zig fmt: comments in statements" { |
| 2905 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2906 | | | |
| 2907 | try testCanonical( | 2743 | try testCanonical( |
| 2908 | \\test "std" { | 2744 | \\test "std" { |
| 2909 | \\ // statement comment | 2745 | \\ // statement comment |
| ... | @@ -2931,8 +2767,6 @@ test "zig fmt: comments before test decl" { | ... | @@ -2931,8 +2767,6 @@ test "zig fmt: comments before test decl" { |
| 2931 | } | 2767 | } |
| 2932 | | 2768 | |
| 2933 | test "zig fmt: preserve spacing" { | 2769 | test "zig fmt: preserve spacing" { |
| 2934 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 2935 | | | |
| 2936 | try testCanonical( | 2770 | try testCanonical( |
| 2937 | \\const std = @import("std"); | 2771 | \\const std = @import("std"); |
| 2938 | \\ | 2772 | \\ |
| ... | @@ -3001,8 +2835,6 @@ test "zig fmt: alignment" { | ... | @@ -3001,8 +2835,6 @@ test "zig fmt: alignment" { |
| 3001 | } | 2835 | } |
| 3002 | | 2836 | |
| 3003 | test "zig fmt: C main" { | 2837 | test "zig fmt: C main" { |
| 3004 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3005 | | | |
| 3006 | try testCanonical( | 2838 | try testCanonical( |
| 3007 | \\fn main(argc: c_int, argv: **u8) c_int { | 2839 | \\fn main(argc: c_int, argv: **u8) c_int { |
| 3008 | \\ const a = b; | 2840 | \\ const a = b; |
| ... | @@ -3012,8 +2844,6 @@ test "zig fmt: C main" { | ... | @@ -3012,8 +2844,6 @@ test "zig fmt: C main" { |
| 3012 | } | 2844 | } |
| 3013 | | 2845 | |
| 3014 | test "zig fmt: return" { | 2846 | test "zig fmt: return" { |
| 3015 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3016 | | | |
| 3017 | try testCanonical( | 2847 | try testCanonical( |
| 3018 | \\fn foo(argc: c_int, argv: **u8) c_int { | 2848 | \\fn foo(argc: c_int, argv: **u8) c_int { |
| 3019 | \\ return 0; | 2849 | \\ return 0; |
| ... | @@ -3076,8 +2906,6 @@ test "zig fmt: slice attributes" { | ... | @@ -3076,8 +2906,6 @@ test "zig fmt: slice attributes" { |
| 3076 | } | 2906 | } |
| 3077 | | 2907 | |
| 3078 | test "zig fmt: test declaration" { | 2908 | test "zig fmt: test declaration" { |
| 3079 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3080 | | | |
| 3081 | try testCanonical( | 2909 | try testCanonical( |
| 3082 | \\test "test name" { | 2910 | \\test "test name" { |
| 3083 | \\ const a = 1; | 2911 | \\ const a = 1; |
| ... | @@ -3088,8 +2916,6 @@ test "zig fmt: test declaration" { | ... | @@ -3088,8 +2916,6 @@ test "zig fmt: test declaration" { |
| 3088 | } | 2916 | } |
| 3089 | | 2917 | |
| 3090 | test "zig fmt: infix operators" { | 2918 | test "zig fmt: infix operators" { |
| 3091 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3092 | | | |
| 3093 | try testCanonical( | 2919 | try testCanonical( |
| 3094 | \\test { | 2920 | \\test { |
| 3095 | \\ var i = undefined; | 2921 | \\ var i = undefined; |
| ... | @@ -3142,8 +2968,6 @@ test "zig fmt: infix operators" { | ... | @@ -3142,8 +2968,6 @@ test "zig fmt: infix operators" { |
| 3142 | } | 2968 | } |
| 3143 | | 2969 | |
| 3144 | test "zig fmt: precedence" { | 2970 | test "zig fmt: precedence" { |
| 3145 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3146 | | | |
| 3147 | try testCanonical( | 2971 | try testCanonical( |
| 3148 | \\test "precedence" { | 2972 | \\test "precedence" { |
| 3149 | \\ a!b(); | 2973 | \\ a!b(); |
| ... | @@ -3176,8 +3000,6 @@ test "zig fmt: precedence" { | ... | @@ -3176,8 +3000,6 @@ test "zig fmt: precedence" { |
| 3176 | } | 3000 | } |
| 3177 | | 3001 | |
| 3178 | test "zig fmt: prefix operators" { | 3002 | test "zig fmt: prefix operators" { |
| 3179 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3180 | | | |
| 3181 | try testCanonical( | 3003 | try testCanonical( |
| 3182 | \\test "prefix operators" { | 3004 | \\test "prefix operators" { |
| 3183 | \\ try return --%~!&0; | 3005 | \\ try return --%~!&0; |
| ... | @@ -3187,8 +3009,6 @@ test "zig fmt: prefix operators" { | ... | @@ -3187,8 +3009,6 @@ test "zig fmt: prefix operators" { |
| 3187 | } | 3009 | } |
| 3188 | | 3010 | |
| 3189 | test "zig fmt: call expression" { | 3011 | test "zig fmt: call expression" { |
| 3190 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3191 | | | |
| 3192 | try testCanonical( | 3012 | try testCanonical( |
| 3193 | \\test "test calls" { | 3013 | \\test "test calls" { |
| 3194 | \\ a(); | 3014 | \\ a(); |
| ... | @@ -3208,8 +3028,6 @@ test "zig fmt: anytype type" { | ... | @@ -3208,8 +3028,6 @@ test "zig fmt: anytype type" { |
| 3208 | } | 3028 | } |
| 3209 | | 3029 | |
| 3210 | test "zig fmt: functions" { | 3030 | test "zig fmt: functions" { |
| 3211 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3212 | | | |
| 3213 | try testCanonical( | 3031 | try testCanonical( |
| 3214 | \\extern fn puts(s: *const u8) c_int; | 3032 | \\extern fn puts(s: *const u8) c_int; |
| 3215 | \\extern "c" fn puts(s: *const u8) c_int; | 3033 | \\extern "c" fn puts(s: *const u8) c_int; |
| ... | @@ -3234,8 +3052,6 @@ test "zig fmt: functions" { | ... | @@ -3234,8 +3052,6 @@ test "zig fmt: functions" { |
| 3234 | } | 3052 | } |
| 3235 | | 3053 | |
| 3236 | test "zig fmt: multiline string" { | 3054 | test "zig fmt: multiline string" { |
| 3237 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3238 | | | |
| 3239 | try testCanonical( | 3055 | try testCanonical( |
| 3240 | \\test "" { | 3056 | \\test "" { |
| 3241 | \\ const s1 = | 3057 | \\ const s1 = |
| ... | @@ -3254,8 +3070,6 @@ test "zig fmt: multiline string" { | ... | @@ -3254,8 +3070,6 @@ test "zig fmt: multiline string" { |
| 3254 | } | 3070 | } |
| 3255 | | 3071 | |
| 3256 | test "zig fmt: values" { | 3072 | test "zig fmt: values" { |
| 3257 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3258 | | | |
| 3259 | try testCanonical( | 3073 | try testCanonical( |
| 3260 | \\test "values" { | 3074 | \\test "values" { |
| 3261 | \\ 1; | 3075 | \\ 1; |
| ... | @@ -3275,8 +3089,6 @@ test "zig fmt: values" { | ... | @@ -3275,8 +3089,6 @@ test "zig fmt: values" { |
| 3275 | } | 3089 | } |
| 3276 | | 3090 | |
| 3277 | test "zig fmt: indexing" { | 3091 | test "zig fmt: indexing" { |
| 3278 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3279 | | | |
| 3280 | try testCanonical( | 3092 | try testCanonical( |
| 3281 | \\test "test index" { | 3093 | \\test "test index" { |
| 3282 | \\ a[0]; | 3094 | \\ a[0]; |
| ... | @@ -3297,8 +3109,6 @@ test "zig fmt: indexing" { | ... | @@ -3297,8 +3109,6 @@ test "zig fmt: indexing" { |
| 3297 | } | 3109 | } |
| 3298 | | 3110 | |
| 3299 | test "zig fmt: struct declaration" { | 3111 | test "zig fmt: struct declaration" { |
| 3300 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3301 | | | |
| 3302 | try testCanonical( | 3112 | try testCanonical( |
| 3303 | \\const S = struct { | 3113 | \\const S = struct { |
| 3304 | \\ const Self = @This(); | 3114 | \\ const Self = @This(); |
| ... | @@ -3405,8 +3215,6 @@ test "zig fmt: union declaration" { | ... | @@ -3405,8 +3215,6 @@ test "zig fmt: union declaration" { |
| 3405 | } | 3215 | } |
| 3406 | | 3216 | |
| 3407 | test "zig fmt: arrays" { | 3217 | test "zig fmt: arrays" { |
| 3408 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3409 | | | |
| 3410 | try testCanonical( | 3218 | try testCanonical( |
| 3411 | \\test "test array" { | 3219 | \\test "test array" { |
| 3412 | \\ const a: [2]u8 = [2]u8{ | 3220 | \\ const a: [2]u8 = [2]u8{ |
| ... | @@ -3425,8 +3233,6 @@ test "zig fmt: arrays" { | ... | @@ -3425,8 +3233,6 @@ test "zig fmt: arrays" { |
| 3425 | } | 3233 | } |
| 3426 | | 3234 | |
| 3427 | test "zig fmt: container initializers" { | 3235 | test "zig fmt: container initializers" { |
| 3428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3429 | | | |
| 3430 | try testCanonical( | 3236 | try testCanonical( |
| 3431 | \\const a0 = []u8{}; | 3237 | \\const a0 = []u8{}; |
| 3432 | \\const a1 = []u8{1}; | 3238 | \\const a1 = []u8{1}; |
| ... | @@ -3447,8 +3253,6 @@ test "zig fmt: container initializers" { | ... | @@ -3447,8 +3253,6 @@ test "zig fmt: container initializers" { |
| 3447 | } | 3253 | } |
| 3448 | | 3254 | |
| 3449 | test "zig fmt: catch" { | 3255 | test "zig fmt: catch" { |
| 3450 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3451 | | | |
| 3452 | try testCanonical( | 3256 | try testCanonical( |
| 3453 | \\test "catch" { | 3257 | \\test "catch" { |
| 3454 | \\ const a: anyerror!u8 = 0; | 3258 | \\ const a: anyerror!u8 = 0; |
| ... | @@ -3464,8 +3268,6 @@ test "zig fmt: catch" { | ... | @@ -3464,8 +3268,6 @@ test "zig fmt: catch" { |
| 3464 | } | 3268 | } |
| 3465 | | 3269 | |
| 3466 | test "zig fmt: blocks" { | 3270 | test "zig fmt: blocks" { |
| 3467 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3468 | | | |
| 3469 | try testCanonical( | 3271 | try testCanonical( |
| 3470 | \\test "blocks" { | 3272 | \\test "blocks" { |
| 3471 | \\ { | 3273 | \\ { |
| ... | @@ -3488,8 +3290,6 @@ test "zig fmt: blocks" { | ... | @@ -3488,8 +3290,6 @@ test "zig fmt: blocks" { |
| 3488 | } | 3290 | } |
| 3489 | | 3291 | |
| 3490 | test "zig fmt: switch" { | 3292 | test "zig fmt: switch" { |
| 3491 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3492 | | | |
| 3493 | try testCanonical( | 3293 | try testCanonical( |
| 3494 | \\test "switch" { | 3294 | \\test "switch" { |
| 3495 | \\ switch (0) { | 3295 | \\ switch (0) { |
| ... | @@ -3545,8 +3345,6 @@ test "zig fmt: switch" { | ... | @@ -3545,8 +3345,6 @@ test "zig fmt: switch" { |
| 3545 | } | 3345 | } |
| 3546 | | 3346 | |
| 3547 | test "zig fmt: switch multiline string" { | 3347 | test "zig fmt: switch multiline string" { |
| 3548 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3549 | | | |
| 3550 | try testCanonical( | 3348 | try testCanonical( |
| 3551 | \\test "switch multiline string" { | 3349 | \\test "switch multiline string" { |
| 3552 | \\ const x: u32 = 0; | 3350 | \\ const x: u32 = 0; |
| ... | @@ -3578,8 +3376,6 @@ test "zig fmt: switch multiline string" { | ... | @@ -3578,8 +3376,6 @@ test "zig fmt: switch multiline string" { |
| 3578 | } | 3376 | } |
| 3579 | | 3377 | |
| 3580 | test "zig fmt: while" { | 3378 | test "zig fmt: while" { |
| 3581 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3582 | | | |
| 3583 | try testCanonical( | 3379 | try testCanonical( |
| 3584 | \\test "while" { | 3380 | \\test "while" { |
| 3585 | \\ while (10 < 1) unreachable; | 3381 | \\ while (10 < 1) unreachable; |
| ... | @@ -3655,8 +3451,6 @@ test "zig fmt: while" { | ... | @@ -3655,8 +3451,6 @@ test "zig fmt: while" { |
| 3655 | } | 3451 | } |
| 3656 | | 3452 | |
| 3657 | test "zig fmt: for" { | 3453 | test "zig fmt: for" { |
| 3658 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3659 | | | |
| 3660 | try testCanonical( | 3454 | try testCanonical( |
| 3661 | \\test "for" { | 3455 | \\test "for" { |
| 3662 | \\ for (a) |v| { | 3456 | \\ for (a) |v| { |
| ... | @@ -3758,8 +3552,6 @@ test "zig fmt: for" { | ... | @@ -3758,8 +3552,6 @@ test "zig fmt: for" { |
| 3758 | } | 3552 | } |
| 3759 | | 3553 | |
| 3760 | test "zig fmt: for if" { | 3554 | test "zig fmt: for if" { |
| 3761 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3762 | | | |
| 3763 | try testCanonical( | 3555 | try testCanonical( |
| 3764 | \\test { | 3556 | \\test { |
| 3765 | \\ for (a) |x| if (x) f(x); | 3557 | \\ for (a) |x| if (x) f(x); |
| ... | @@ -3785,8 +3577,6 @@ test "zig fmt: for if" { | ... | @@ -3785,8 +3577,6 @@ test "zig fmt: for if" { |
| 3785 | } | 3577 | } |
| 3786 | | 3578 | |
| 3787 | test "zig fmt: if for" { | 3579 | test "zig fmt: if for" { |
| 3788 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3789 | | | |
| 3790 | try testCanonical( | 3580 | try testCanonical( |
| 3791 | \\test { | 3581 | \\test { |
| 3792 | \\ if (a) for (x) |x| f(x); | 3582 | \\ if (a) for (x) |x| f(x); |
| ... | @@ -3812,8 +3602,6 @@ test "zig fmt: if for" { | ... | @@ -3812,8 +3602,6 @@ test "zig fmt: if for" { |
| 3812 | } | 3602 | } |
| 3813 | | 3603 | |
| 3814 | test "zig fmt: while if" { | 3604 | test "zig fmt: while if" { |
| 3815 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3816 | | | |
| 3817 | try testCanonical( | 3605 | try testCanonical( |
| 3818 | \\test { | 3606 | \\test { |
| 3819 | \\ while (a) if (x) f(x); | 3607 | \\ while (a) if (x) f(x); |
| ... | @@ -3839,8 +3627,6 @@ test "zig fmt: while if" { | ... | @@ -3839,8 +3627,6 @@ test "zig fmt: while if" { |
| 3839 | } | 3627 | } |
| 3840 | | 3628 | |
| 3841 | test "zig fmt: if while" { | 3629 | test "zig fmt: if while" { |
| 3842 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3843 | | | |
| 3844 | try testCanonical( | 3630 | try testCanonical( |
| 3845 | \\test { | 3631 | \\test { |
| 3846 | \\ if (a) while (x) : (cont) f(x); | 3632 | \\ if (a) while (x) : (cont) f(x); |
| ... | @@ -3866,8 +3652,6 @@ test "zig fmt: if while" { | ... | @@ -3866,8 +3652,6 @@ test "zig fmt: if while" { |
| 3866 | } | 3652 | } |
| 3867 | | 3653 | |
| 3868 | test "zig fmt: while for" { | 3654 | test "zig fmt: while for" { |
| 3869 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3870 | | | |
| 3871 | try testCanonical( | 3655 | try testCanonical( |
| 3872 | \\test { | 3656 | \\test { |
| 3873 | \\ while (a) for (x) |x| f(x); | 3657 | \\ while (a) for (x) |x| f(x); |
| ... | @@ -3893,8 +3677,6 @@ test "zig fmt: while for" { | ... | @@ -3893,8 +3677,6 @@ test "zig fmt: while for" { |
| 3893 | } | 3677 | } |
| 3894 | | 3678 | |
| 3895 | test "zig fmt: for while" { | 3679 | test "zig fmt: for while" { |
| 3896 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3897 | | | |
| 3898 | try testCanonical( | 3680 | try testCanonical( |
| 3899 | \\test { | 3681 | \\test { |
| 3900 | \\ for (a) |a| while (x) |x| f(x); | 3682 | \\ for (a) |a| while (x) |x| f(x); |
| ... | @@ -3920,8 +3702,6 @@ test "zig fmt: for while" { | ... | @@ -3920,8 +3702,6 @@ test "zig fmt: for while" { |
| 3920 | } | 3702 | } |
| 3921 | | 3703 | |
| 3922 | test "zig fmt: if" { | 3704 | test "zig fmt: if" { |
| 3923 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3924 | | | |
| 3925 | try testCanonical( | 3705 | try testCanonical( |
| 3926 | \\test "if" { | 3706 | \\test "if" { |
| 3927 | \\ if (10 < 0) { | 3707 | \\ if (10 < 0) { |
| ... | @@ -3971,8 +3751,6 @@ test "zig fmt: if" { | ... | @@ -3971,8 +3751,6 @@ test "zig fmt: if" { |
| 3971 | } | 3751 | } |
| 3972 | | 3752 | |
| 3973 | test "zig fmt: fix single statement if/for/while line breaks" { | 3753 | test "zig fmt: fix single statement if/for/while line breaks" { |
| 3974 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 3975 | | | |
| 3976 | try testTransform( | 3754 | try testTransform( |
| 3977 | \\test { | 3755 | \\test { |
| 3978 | \\ if (cond) a | 3756 | \\ if (cond) a |
| ... | @@ -4051,8 +3829,6 @@ test "zig fmt: anon struct/array literal in if" { | ... | @@ -4051,8 +3829,6 @@ test "zig fmt: anon struct/array literal in if" { |
| 4051 | } | 3829 | } |
| 4052 | | 3830 | |
| 4053 | test "zig fmt: defer" { | 3831 | test "zig fmt: defer" { |
| 4054 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4055 | | | |
| 4056 | try testCanonical( | 3832 | try testCanonical( |
| 4057 | \\test "defer" { | 3833 | \\test "defer" { |
| 4058 | \\ var i: usize = 0; | 3834 | \\ var i: usize = 0; |
| ... | @@ -4073,8 +3849,6 @@ test "zig fmt: defer" { | ... | @@ -4073,8 +3849,6 @@ test "zig fmt: defer" { |
| 4073 | } | 3849 | } |
| 4074 | | 3850 | |
| 4075 | test "zig fmt: comptime" { | 3851 | test "zig fmt: comptime" { |
| 4076 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4077 | | | |
| 4078 | try testCanonical( | 3852 | try testCanonical( |
| 4079 | \\fn a() u8 { | 3853 | \\fn a() u8 { |
| 4080 | \\ return 5; | 3854 | \\ return 5; |
| ... | @@ -4114,8 +3888,6 @@ test "zig fmt: comptime" { | ... | @@ -4114,8 +3888,6 @@ test "zig fmt: comptime" { |
| 4114 | } | 3888 | } |
| 4115 | | 3889 | |
| 4116 | test "zig fmt: fn type" { | 3890 | test "zig fmt: fn type" { |
| 4117 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4118 | | | |
| 4119 | try testCanonical( | 3891 | try testCanonical( |
| 4120 | \\fn a(i: u8) u8 { | 3892 | \\fn a(i: u8) u8 { |
| 4121 | \\ return i + 1; | 3893 | \\ return i + 1; |
| ... | @@ -4129,8 +3901,6 @@ test "zig fmt: fn type" { | ... | @@ -4129,8 +3901,6 @@ test "zig fmt: fn type" { |
| 4129 | } | 3901 | } |
| 4130 | | 3902 | |
| 4131 | test "zig fmt: inline asm" { | 3903 | test "zig fmt: inline asm" { |
| 4132 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4133 | | | |
| 4134 | try testCanonical( | 3904 | try testCanonical( |
| 4135 | \\pub fn syscall1(number: usize, arg1: usize) usize { | 3905 | \\pub fn syscall1(number: usize, arg1: usize) usize { |
| 4136 | \\ return asm volatile ("syscall" | 3906 | \\ return asm volatile ("syscall" |
| ... | @@ -4145,8 +3915,6 @@ test "zig fmt: inline asm" { | ... | @@ -4145,8 +3915,6 @@ test "zig fmt: inline asm" { |
| 4145 | } | 3915 | } |
| 4146 | | 3916 | |
| 4147 | test "zig fmt: async functions" { | 3917 | test "zig fmt: async functions" { |
| 4148 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4149 | | | |
| 4150 | try testCanonical( | 3918 | try testCanonical( |
| 4151 | \\fn simpleAsyncFn() void { | 3919 | \\fn simpleAsyncFn() void { |
| 4152 | \\ const a = async a.b(); | 3920 | \\ const a = async a.b(); |
| ... | @@ -4175,8 +3943,6 @@ test "zig fmt: nosuspend" { | ... | @@ -4175,8 +3943,6 @@ test "zig fmt: nosuspend" { |
| 4175 | } | 3943 | } |
| 4176 | | 3944 | |
| 4177 | test "zig fmt: Block after if" { | 3945 | test "zig fmt: Block after if" { |
| 4178 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4179 | | | |
| 4180 | try testCanonical( | 3946 | try testCanonical( |
| 4181 | \\test { | 3947 | \\test { |
| 4182 | \\ if (true) { | 3948 | \\ if (true) { |
| ... | @@ -4208,8 +3974,6 @@ test "zig fmt: string identifier" { | ... | @@ -4208,8 +3974,6 @@ test "zig fmt: string identifier" { |
| 4208 | } | 3974 | } |
| 4209 | | 3975 | |
| 4210 | test "zig fmt: error return" { | 3976 | test "zig fmt: error return" { |
| 4211 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4212 | | | |
| 4213 | try testCanonical( | 3977 | try testCanonical( |
| 4214 | \\fn err() anyerror { | 3978 | \\fn err() anyerror { |
| 4215 | \\ call(); | 3979 | \\ call(); |
| ... | @@ -4220,8 +3984,6 @@ test "zig fmt: error return" { | ... | @@ -4220,8 +3984,6 @@ test "zig fmt: error return" { |
| 4220 | } | 3984 | } |
| 4221 | | 3985 | |
| 4222 | test "zig fmt: comptime block in container" { | 3986 | test "zig fmt: comptime block in container" { |
| 4223 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4224 | | | |
| 4225 | try testCanonical( | 3987 | try testCanonical( |
| 4226 | \\pub fn container() type { | 3988 | \\pub fn container() type { |
| 4227 | \\ return struct { | 3989 | \\ return struct { |
| ... | @@ -4237,8 +3999,6 @@ test "zig fmt: comptime block in container" { | ... | @@ -4237,8 +3999,6 @@ test "zig fmt: comptime block in container" { |
| 4237 | } | 3999 | } |
| 4238 | | 4000 | |
| 4239 | test "zig fmt: inline asm parameter alignment" { | 4001 | test "zig fmt: inline asm parameter alignment" { |
| 4240 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4241 | | | |
| 4242 | try testCanonical( | 4002 | try testCanonical( |
| 4243 | \\pub fn main() void { | 4003 | \\pub fn main() void { |
| 4244 | \\ asm volatile ( | 4004 | \\ asm volatile ( |
| ... | @@ -4277,8 +4037,6 @@ test "zig fmt: inline asm parameter alignment" { | ... | @@ -4277,8 +4037,6 @@ test "zig fmt: inline asm parameter alignment" { |
| 4277 | } | 4037 | } |
| 4278 | | 4038 | |
| 4279 | test "zig fmt: multiline string in array" { | 4039 | test "zig fmt: multiline string in array" { |
| 4280 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4281 | | | |
| 4282 | try testCanonical( | 4040 | try testCanonical( |
| 4283 | \\const Foo = [][]const u8{ | 4041 | \\const Foo = [][]const u8{ |
| 4284 | \\ \\aaa | 4042 | \\ \\aaa |
| ... | @@ -4304,8 +4062,6 @@ test "zig fmt: multiline string in array" { | ... | @@ -4304,8 +4062,6 @@ test "zig fmt: multiline string in array" { |
| 4304 | } | 4062 | } |
| 4305 | | 4063 | |
| 4306 | test "zig fmt: if type expr" { | 4064 | test "zig fmt: if type expr" { |
| 4307 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4308 | | | |
| 4309 | try testCanonical( | 4065 | try testCanonical( |
| 4310 | \\const mycond = true; | 4066 | \\const mycond = true; |
| 4311 | \\pub fn foo() if (mycond) i32 else void { | 4067 | \\pub fn foo() if (mycond) i32 else void { |
| ... | @@ -4334,8 +4090,6 @@ test "zig fmt: comment after empty comment" { | ... | @@ -4334,8 +4090,6 @@ test "zig fmt: comment after empty comment" { |
| 4334 | } | 4090 | } |
| 4335 | | 4091 | |
| 4336 | test "zig fmt: line comment in array" { | 4092 | test "zig fmt: line comment in array" { |
| 4337 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4338 | | | |
| 4339 | try testTransform( | 4093 | try testTransform( |
| 4340 | \\test "a" { | 4094 | \\test "a" { |
| 4341 | \\ var arr = [_]u32{ | 4095 | \\ var arr = [_]u32{ |
| ... | @@ -4394,8 +4148,6 @@ test "zig fmt: comment after params" { | ... | @@ -4394,8 +4148,6 @@ test "zig fmt: comment after params" { |
| 4394 | } | 4148 | } |
| 4395 | | 4149 | |
| 4396 | test "zig fmt: comment in array initializer/access" { | 4150 | test "zig fmt: comment in array initializer/access" { |
| 4397 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4398 | | | |
| 4399 | try testCanonical( | 4151 | try testCanonical( |
| 4400 | \\test "a" { | 4152 | \\test "a" { |
| 4401 | \\ var a = x{ //aa | 4153 | \\ var a = x{ //aa |
| ... | @@ -4432,8 +4184,6 @@ test "zig fmt: comment in array initializer/access" { | ... | @@ -4432,8 +4184,6 @@ test "zig fmt: comment in array initializer/access" { |
| 4432 | } | 4184 | } |
| 4433 | | 4185 | |
| 4434 | test "zig fmt: comments at several places in struct init" { | 4186 | test "zig fmt: comments at several places in struct init" { |
| 4435 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4436 | | | |
| 4437 | try testTransform( | 4187 | try testTransform( |
| 4438 | \\var bar = Bar{ | 4188 | \\var bar = Bar{ |
| 4439 | \\ .x = 10, // test | 4189 | \\ .x = 10, // test |
| ... | @@ -4657,8 +4407,6 @@ test "zig fmt: integer literals with underscore separators" { | ... | @@ -4657,8 +4407,6 @@ test "zig fmt: integer literals with underscore separators" { |
| 4657 | } | 4407 | } |
| 4658 | | 4408 | |
| 4659 | test "zig fmt: hex literals with underscore separators" { | 4409 | test "zig fmt: hex literals with underscore separators" { |
| 4660 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4661 | | | |
| 4662 | try testTransform( | 4410 | try testTransform( |
| 4663 | \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 { | 4411 | \\pub fn orMask(a: [ 1_000 ]u64, b: [ 1_000] u64) [1_000]u64 { |
| 4664 | \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000; | 4412 | \\ var c: [1_000]u64 = [1]u64{ 0xFFFF_FFFF_FFFF_FFFF}**1_000; |
| ... | @@ -4682,8 +4430,6 @@ test "zig fmt: hex literals with underscore separators" { | ... | @@ -4682,8 +4430,6 @@ test "zig fmt: hex literals with underscore separators" { |
| 4682 | } | 4430 | } |
| 4683 | | 4431 | |
| 4684 | test "zig fmt: decimal float literals with underscore separators" { | 4432 | test "zig fmt: decimal float literals with underscore separators" { |
| 4685 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4686 | | | |
| 4687 | try testTransform( | 4433 | try testTransform( |
| 4688 | \\pub fn main() void { | 4434 | \\pub fn main() void { |
| 4689 | \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4; | 4435 | \\ const a:f64=(10.0e-0+(10.0e+0))+10_00.00_00e-2+20_00.00_10e+4; |
| ... | @@ -4701,8 +4447,6 @@ test "zig fmt: decimal float literals with underscore separators" { | ... | @@ -4701,8 +4447,6 @@ test "zig fmt: decimal float literals with underscore separators" { |
| 4701 | } | 4447 | } |
| 4702 | | 4448 | |
| 4703 | test "zig fmt: hexadeciaml float literals with underscore separators" { | 4449 | test "zig fmt: hexadeciaml float literals with underscore separators" { |
| 4704 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4705 | | | |
| 4706 | try testTransform( | 4450 | try testTransform( |
| 4707 | \\pub fn main() void { | 4451 | \\pub fn main() void { |
| 4708 | \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16; | 4452 | \\ const a: f64 = (0x10.0p-0+(0x10.0p+0))+0x10_00.00_00p-8+0x00_00.00_10p+16; |
| ... | @@ -4727,8 +4471,6 @@ test "zig fmt: C var args" { | ... | @@ -4727,8 +4471,6 @@ test "zig fmt: C var args" { |
| 4727 | } | 4471 | } |
| 4728 | | 4472 | |
| 4729 | test "zig fmt: Only indent multiline string literals in function calls" { | 4473 | test "zig fmt: Only indent multiline string literals in function calls" { |
| 4730 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4731 | | | |
| 4732 | try testCanonical( | 4474 | try testCanonical( |
| 4733 | \\test "zig fmt:" { | 4475 | \\test "zig fmt:" { |
| 4734 | \\ try testTransform( | 4476 | \\ try testTransform( |
| ... | @@ -4746,8 +4488,6 @@ test "zig fmt: Only indent multiline string literals in function calls" { | ... | @@ -4746,8 +4488,6 @@ test "zig fmt: Only indent multiline string literals in function calls" { |
| 4746 | } | 4488 | } |
| 4747 | | 4489 | |
| 4748 | test "zig fmt: Don't add extra newline after if" { | 4490 | test "zig fmt: Don't add extra newline after if" { |
| 4749 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4750 | | | |
| 4751 | try testCanonical( | 4491 | try testCanonical( |
| 4752 | \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void { | 4492 | \\pub fn atomicSymLink(allocator: Allocator, existing_path: []const u8, new_path: []const u8) !void { |
| 4753 | \\ if (cwd().symLink(existing_path, new_path, .{})) { | 4493 | \\ if (cwd().symLink(existing_path, new_path, .{})) { |
| ... | @@ -4759,8 +4499,6 @@ test "zig fmt: Don't add extra newline after if" { | ... | @@ -4759,8 +4499,6 @@ test "zig fmt: Don't add extra newline after if" { |
| 4759 | } | 4499 | } |
| 4760 | | 4500 | |
| 4761 | test "zig fmt: comments in ternary ifs" { | 4501 | test "zig fmt: comments in ternary ifs" { |
| 4762 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4763 | | | |
| 4764 | try testCanonical( | 4502 | try testCanonical( |
| 4765 | \\const x = if (true) { | 4503 | \\const x = if (true) { |
| 4766 | \\ 1; | 4504 | \\ 1; |
| ... | @@ -4780,8 +4518,6 @@ test "zig fmt: comments in ternary ifs" { | ... | @@ -4780,8 +4518,6 @@ test "zig fmt: comments in ternary ifs" { |
| 4780 | } | 4518 | } |
| 4781 | | 4519 | |
| 4782 | test "zig fmt: while statement in blockless if" { | 4520 | test "zig fmt: while statement in blockless if" { |
| 4783 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4784 | | | |
| 4785 | try testCanonical( | 4521 | try testCanonical( |
| 4786 | \\pub fn main() void { | 4522 | \\pub fn main() void { |
| 4787 | \\ const zoom_node = if (focused_node == layout_first) | 4523 | \\ const zoom_node = if (focused_node == layout_first) |
| ... | @@ -4831,8 +4567,6 @@ test "zig fmt: test comments in field access chain" { | ... | @@ -4831,8 +4567,6 @@ test "zig fmt: test comments in field access chain" { |
| 4831 | } | 4567 | } |
| 4832 | | 4568 | |
| 4833 | test "zig fmt: allow line break before field access" { | 4569 | test "zig fmt: allow line break before field access" { |
| 4834 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4835 | | | |
| 4836 | try testCanonical( | 4570 | try testCanonical( |
| 4837 | \\test { | 4571 | \\test { |
| 4838 | \\ const w = foo.bar().zippy(zag).iguessthisisok(); | 4572 | \\ const w = foo.bar().zippy(zag).iguessthisisok(); |
| ... | @@ -4908,8 +4642,6 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis | ... | @@ -4908,8 +4642,6 @@ test "zig fmt: Indent comma correctly after multiline string literals in arg lis |
| 4908 | } | 4642 | } |
| 4909 | | 4643 | |
| 4910 | test "zig fmt: Control flow statement as body of blockless if" { | 4644 | test "zig fmt: Control flow statement as body of blockless if" { |
| 4911 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4912 | | | |
| 4913 | try testCanonical( | 4645 | try testCanonical( |
| 4914 | \\pub fn main() void { | 4646 | \\pub fn main() void { |
| 4915 | \\ const zoom_node = if (focused_node == layout_first) | 4647 | \\ const zoom_node = if (focused_node == layout_first) |
| ... | @@ -4945,8 +4677,6 @@ test "zig fmt: Control flow statement as body of blockless if" { | ... | @@ -4945,8 +4677,6 @@ test "zig fmt: Control flow statement as body of blockless if" { |
| 4945 | } | 4677 | } |
| 4946 | | 4678 | |
| 4947 | test "zig fmt: regression test for #5722" { | 4679 | test "zig fmt: regression test for #5722" { |
| 4948 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 4949 | | | |
| 4950 | try testCanonical( | 4680 | try testCanonical( |
| 4951 | \\pub fn sendViewTags(self: Self) void { | 4681 | \\pub fn sendViewTags(self: Self) void { |
| 4952 | \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32)); | 4682 | \\ var it = ViewStack(View).iterator(self.output.views.first, std.math.maxInt(u32)); |
| ... | @@ -5077,8 +4807,6 @@ test "zig fmt: multiline string literals should play nice with array initializer | ... | @@ -5077,8 +4807,6 @@ test "zig fmt: multiline string literals should play nice with array initializer |
| 5077 | } | 4807 | } |
| 5078 | | 4808 | |
| 5079 | test "zig fmt: use of comments and multiline string literals may force the parameters over multiple lines" { | 4809 | 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 | | | |
| 5082 | try testCanonical( | 4810 | try testCanonical( |
| 5083 | \\pub fn makeMemUndefined(qzz: []u8) i1 { | 4811 | \\pub fn makeMemUndefined(qzz: []u8) i1 { |
| 5084 | \\ cases.add( // fixed bug foo | 4812 | \\ cases.add( // fixed bug foo |
| ... | @@ -5119,8 +4847,6 @@ test "zig fmt: use of comments and multiline string literals may force the param | ... | @@ -5119,8 +4847,6 @@ test "zig fmt: use of comments and multiline string literals may force the param |
| 5119 | } | 4847 | } |
| 5120 | | 4848 | |
| 5121 | test "zig fmt: single argument trailing commas in @builtins()" { | 4849 | test "zig fmt: single argument trailing commas in @builtins()" { |
| 5122 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5123 | | | |
| 5124 | try testCanonical( | 4850 | try testCanonical( |
| 5125 | \\pub fn foo(qzz: []u8) i1 { | 4851 | \\pub fn foo(qzz: []u8) i1 { |
| 5126 | \\ @panic( | 4852 | \\ @panic( |
| ... | @@ -5154,8 +4880,6 @@ test "zig fmt: trailing comma should force multiline 1 column" { | ... | @@ -5154,8 +4880,6 @@ test "zig fmt: trailing comma should force multiline 1 column" { |
| 5154 | } | 4880 | } |
| 5155 | | 4881 | |
| 5156 | test "zig fmt: function params should align nicely" { | 4882 | test "zig fmt: function params should align nicely" { |
| 5157 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5158 | | | |
| 5159 | try testCanonical( | 4883 | try testCanonical( |
| 5160 | \\pub fn foo() void { | 4884 | \\pub fn foo() void { |
| 5161 | \\ cases.addRuntimeSafety("slicing operator with sentinel", | 4885 | \\ cases.addRuntimeSafety("slicing operator with sentinel", |
| ... | @@ -5212,8 +4936,6 @@ test "zig fmt: remove trailing whitespace after doc comment" { | ... | @@ -5212,8 +4936,6 @@ test "zig fmt: remove trailing whitespace after doc comment" { |
| 5212 | } | 4936 | } |
| 5213 | | 4937 | |
| 5214 | test "zig fmt: for loop with ptr payload and index" { | 4938 | test "zig fmt: for loop with ptr payload and index" { |
| 5215 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5216 | | | |
| 5217 | try testCanonical( | 4939 | try testCanonical( |
| 5218 | \\test { | 4940 | \\test { |
| 5219 | \\ for (self.entries.items, 0..) |*item, i| {} | 4941 | \\ for (self.entries.items, 0..) |*item, i| {} |
| ... | @@ -5226,8 +4948,6 @@ test "zig fmt: for loop with ptr payload and index" { | ... | @@ -5226,8 +4948,6 @@ test "zig fmt: for loop with ptr payload and index" { |
| 5226 | } | 4948 | } |
| 5227 | | 4949 | |
| 5228 | test "zig fmt: proper indent line comment after multi-line single expr while loop" { | 4950 | 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 | | | |
| 5231 | try testCanonical( | 4951 | try testCanonical( |
| 5232 | \\test { | 4952 | \\test { |
| 5233 | \\ while (a) : (b) | 4953 | \\ while (a) : (b) |
| ... | @@ -5241,8 +4961,6 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo | ... | @@ -5241,8 +4961,6 @@ test "zig fmt: proper indent line comment after multi-line single expr while loo |
| 5241 | } | 4961 | } |
| 5242 | | 4962 | |
| 5243 | test "zig fmt: function with labeled block as return type" { | 4963 | test "zig fmt: function with labeled block as return type" { |
| 5244 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5245 | | | |
| 5246 | try testCanonical( | 4964 | try testCanonical( |
| 5247 | \\fn foo() t: { | 4965 | \\fn foo() t: { |
| 5248 | \\ break :t bar; | 4966 | \\ break :t bar; |
| ... | @@ -5265,8 +4983,6 @@ test "zig fmt: extern function with missing param name" { | ... | @@ -5265,8 +4983,6 @@ test "zig fmt: extern function with missing param name" { |
| 5265 | } | 4983 | } |
| 5266 | | 4984 | |
| 5267 | test "zig fmt: line comment after multiline single expr if statement with multiline string" { | 4985 | 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 | | | |
| 5270 | try testCanonical( | 4986 | try testCanonical( |
| 5271 | \\test { | 4987 | \\test { |
| 5272 | \\ if (foo) | 4988 | \\ if (foo) |
| ... | @@ -5299,8 +5015,6 @@ test "zig fmt: line comment after multiline single expr if statement with multil | ... | @@ -5299,8 +5015,6 @@ test "zig fmt: line comment after multiline single expr if statement with multil |
| 5299 | } | 5015 | } |
| 5300 | | 5016 | |
| 5301 | test "zig fmt: respect extra newline between fn and pub usingnamespace" { | 5017 | test "zig fmt: respect extra newline between fn and pub usingnamespace" { |
| 5302 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5303 | | | |
| 5304 | try testCanonical( | 5018 | try testCanonical( |
| 5305 | \\fn foo() void { | 5019 | \\fn foo() void { |
| 5306 | \\ bar(); | 5020 | \\ bar(); |
| ... | @@ -5425,8 +5139,6 @@ test "zig fmt: insert trailing comma if comments in array init" { | ... | @@ -5425,8 +5139,6 @@ test "zig fmt: insert trailing comma if comments in array init" { |
| 5425 | } | 5139 | } |
| 5426 | | 5140 | |
| 5427 | test "zig fmt: make single-line if no trailing comma" { | 5141 | test "zig fmt: make single-line if no trailing comma" { |
| 5428 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5429 | | | |
| 5430 | try testTransform( | 5142 | try testTransform( |
| 5431 | \\test "function call no trailing comma" { | 5143 | \\test "function call no trailing comma" { |
| 5432 | \\ foo( | 5144 | \\ foo( |
| ... | @@ -5606,8 +5318,6 @@ test "zig fmt: missing const/var before local variable" { | ... | @@ -5606,8 +5318,6 @@ test "zig fmt: missing const/var before local variable" { |
| 5606 | } | 5318 | } |
| 5607 | | 5319 | |
| 5608 | test "zig fmt: while continue expr" { | 5320 | test "zig fmt: while continue expr" { |
| 5609 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5610 | | | |
| 5611 | try testCanonical( | 5321 | try testCanonical( |
| 5612 | \\test { | 5322 | \\test { |
| 5613 | \\ while (i > 0) | 5323 | \\ while (i > 0) |
| ... | @@ -5627,8 +5337,6 @@ test "zig fmt: while continue expr" { | ... | @@ -5627,8 +5337,6 @@ test "zig fmt: while continue expr" { |
| 5627 | } | 5337 | } |
| 5628 | | 5338 | |
| 5629 | test "zig fmt: canonicalize symbols (simple)" { | 5339 | test "zig fmt: canonicalize symbols (simple)" { |
| 5630 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5631 | | | |
| 5632 | try testTransform( | 5340 | try testTransform( |
| 5633 | \\const val_normal: Normal = .{}; | 5341 | \\const val_normal: Normal = .{}; |
| 5634 | \\const @"val_unesc_me": @"UnescMe" = .{}; | 5342 | \\const @"val_unesc_me": @"UnescMe" = .{}; |
| ... | @@ -5778,8 +5486,6 @@ test "zig fmt: canonicalize symbols (simple)" { | ... | @@ -5778,8 +5486,6 @@ test "zig fmt: canonicalize symbols (simple)" { |
| 5778 | | 5486 | |
| 5779 | // Contextually unescape when shadowing primitive types and values. | 5487 | // Contextually unescape when shadowing primitive types and values. |
| 5780 | test "zig fmt: canonicalize symbols (primitive types)" { | 5488 | test "zig fmt: canonicalize symbols (primitive types)" { |
| 5781 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5782 | | | |
| 5783 | try testTransform( | 5489 | try testTransform( |
| 5784 | \\const @"anyopaque" = struct { | 5490 | \\const @"anyopaque" = struct { |
| 5785 | \\ @"u8": @"type" = true, | 5491 | \\ @"u8": @"type" = true, |
| ... | @@ -5889,8 +5595,6 @@ test "zig fmt: canonicalize symbols (primitive types)" { | ... | @@ -5889,8 +5595,6 @@ test "zig fmt: canonicalize symbols (primitive types)" { |
| 5889 | | 5595 | |
| 5890 | // Never unescape names spelled like keywords. | 5596 | // Never unescape names spelled like keywords. |
| 5891 | test "zig fmt: canonicalize symbols (keywords)" { | 5597 | test "zig fmt: canonicalize symbols (keywords)" { |
| 5892 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5893 | | | |
| 5894 | try testCanonical( | 5598 | try testCanonical( |
| 5895 | \\const @"enum" = struct { | 5599 | \\const @"enum" = struct { |
| 5896 | \\ @"error": @"struct" = true, | 5600 | \\ @"error": @"struct" = true, |
| ... | @@ -5918,8 +5622,6 @@ test "zig fmt: canonicalize symbols (keywords)" { | ... | @@ -5918,8 +5622,6 @@ test "zig fmt: canonicalize symbols (keywords)" { |
| 5918 | } | 5622 | } |
| 5919 | | 5623 | |
| 5920 | test "zig fmt: no space before newline before multiline string" { | 5624 | test "zig fmt: no space before newline before multiline string" { |
| 5921 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5922 | | | |
| 5923 | try testCanonical( | 5625 | try testCanonical( |
| 5924 | \\const S = struct { | 5626 | \\const S = struct { |
| 5925 | \\ text: []const u8, | 5627 | \\ text: []const u8, |
| ... | @@ -5950,8 +5652,6 @@ test "zig fmt: no space before newline before multiline string" { | ... | @@ -5950,8 +5652,6 @@ test "zig fmt: no space before newline before multiline string" { |
| 5950 | | 5652 | |
| 5951 | // Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes. | 5653 | // Normalize \xNN and \u{NN} escapes and unicode inside @"" escapes. |
| 5952 | test "zig fmt: canonicalize symbols (character escapes)" { | 5654 | test "zig fmt: canonicalize symbols (character escapes)" { |
| 5953 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5954 | | | |
| 5955 | try testTransform( | 5655 | try testTransform( |
| 5956 | \\const @"\x46\x6f\x6f\x64" = struct { | 5656 | \\const @"\x46\x6f\x6f\x64" = struct { |
| 5957 | \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false, | 5657 | \\ @"\x62\x61\x72\x6E": @"\x43\x72\x61\x62" = false, |
| ... | @@ -5994,8 +5694,6 @@ test "zig fmt: canonicalize symbols (character escapes)" { | ... | @@ -5994,8 +5694,6 @@ test "zig fmt: canonicalize symbols (character escapes)" { |
| 5994 | } | 5694 | } |
| 5995 | | 5695 | |
| 5996 | test "zig fmt: canonicalize symbols (asm)" { | 5696 | test "zig fmt: canonicalize symbols (asm)" { |
| 5997 | if (@import("builtin").zig_backend == .stage2_x86_64) return error.SkipZigTest; | | |
| 5998 | | | |
| 5999 | try testTransform( | 5697 | try testTransform( |
| 6000 | \\test "asm" { | 5698 | \\test "asm" { |
| 6001 | \\ const @"null" = usize; | 5699 | \\ const @"null" = usize; |