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