| ... | @@ -1863,46 +1863,42 @@ test "zig fmt: extra newlines at the end" { | ... | @@ -1863,46 +1863,42 @@ test "zig fmt: extra newlines at the end" { |
| 1863 | ); | 1863 | ); |
| 1864 | } | 1864 | } |
| 1865 | | 1865 | |
| 1866 | //test "zig fmt: simple asm" { | 1866 | test "zig fmt: simple asm" { |
| 1867 | // try testTransform( | 1867 | try testTransform( |
| 1868 | // \\comptime { | 1868 | \\comptime { |
| 1869 | // \\ asm volatile ( | 1869 | \\ asm volatile ( |
| 1870 | // \\ \\.globl aoeu; | 1870 | \\ \\.globl aoeu; |
| 1871 | // \\ \\.type aoeu, @function; | 1871 | \\ \\.type aoeu, @function; |
| 1872 | // \\ \\.set aoeu, derp; | 1872 | \\ \\.set aoeu, derp; |
| 1873 | // \\ ); | 1873 | \\ ); |
| 1874 | // \\ | 1874 | \\ |
| 1875 | // \\ asm ("not real assembly" | 1875 | \\ asm ("not real assembly" |
| 1876 | // \\ :[a] "x" (x),); | 1876 | \\ :[a] "x" (x),); |
| 1877 | // \\ asm ("not real assembly" | 1877 | \\ asm ("not real assembly" |
| 1878 | // \\ :[a] "x" (->i32),:[a] "x" (1),); | 1878 | \\ :[a] "x" (->i32),:[a] "x" (1),); |
| 1879 | // \\ asm ("still not real assembly" | 1879 | \\ asm ("still not real assembly" |
| 1880 | // \\ :::"a","b",); | 1880 | \\ :::"a","b",); |
| 1881 | // \\} | 1881 | \\} |
| 1882 | // , | 1882 | , |
| 1883 | // \\comptime { | 1883 | \\comptime { |
| 1884 | // \\ asm volatile ( | 1884 | \\ asm volatile ( |
| 1885 | // \\ \\.globl aoeu; | 1885 | \\ \\.globl aoeu; |
| 1886 | // \\ \\.type aoeu, @function; | 1886 | \\ \\.type aoeu, @function; |
| 1887 | // \\ \\.set aoeu, derp; | 1887 | \\ \\.set aoeu, derp; |
| 1888 | // \\ ); | 1888 | \\ ); |
| 1889 | // \\ | 1889 | \\ |
| 1890 | // \\ asm ("not real assembly" | 1890 | \\ asm ("not real assembly" |
| 1891 | // \\ : [a] "x" (x) | 1891 | \\ : [a] "x" (x) |
| 1892 | // \\ ); | 1892 | \\ ); |
| 1893 | // \\ asm ("not real assembly" | 1893 | \\ asm ("not real assembly" |
| 1894 | // \\ : [a] "x" (-> i32) | 1894 | \\ : [a] "x" (-> i32) |
| 1895 | // \\ : [a] "x" (1) | 1895 | \\ : [a] "x" (1) |
| 1896 | // \\ ); | 1896 | \\ ); |
| 1897 | // \\ asm ("still not real assembly" | 1897 | \\ asm ("still not real assembly" ::: "a", "b"); |
| 1898 | // \\ : | 1898 | \\} |
| 1899 | // \\ : | 1899 | \\ |
| 1900 | // \\ : "a", "b" | 1900 | ); |
| 1901 | // \\ ); | 1901 | } |
| 1902 | // \\} | | |
| 1903 | // \\ | | |
| 1904 | // ); | | |
| 1905 | //} | | |
| 1906 | | 1902 | |
| 1907 | test "zig fmt: nested struct literal with one item" { | 1903 | test "zig fmt: nested struct literal with one item" { |
| 1908 | try testCanonical( | 1904 | try testCanonical( |
| ... | @@ -3363,46 +3359,43 @@ test "zig fmt: comptime block in container" { | ... | @@ -3363,46 +3359,43 @@ test "zig fmt: comptime block in container" { |
| 3363 | ); | 3359 | ); |
| 3364 | } | 3360 | } |
| 3365 | | 3361 | |
| 3366 | //test "zig fmt: inline asm parameter alignment" { | 3362 | test "zig fmt: inline asm parameter alignment" { |
| 3367 | // try testCanonical( | 3363 | try testCanonical( |
| 3368 | // \\pub fn main() void { | 3364 | \\pub fn main() void { |
| 3369 | // \\ asm volatile ( | 3365 | \\ asm volatile ( |
| 3370 | // \\ \\ foo | 3366 | \\ \\ foo |
| 3371 | // \\ \\ bar | 3367 | \\ \\ bar |
| 3372 | // \\ ); | 3368 | \\ ); |
| 3373 | // \\ asm volatile ( | 3369 | \\ asm volatile ( |
| 3374 | // \\ \\ foo | 3370 | \\ \\ foo |
| 3375 | // \\ \\ bar | 3371 | \\ \\ bar |
| 3376 | // \\ : [_] "" (-> usize), | 3372 | \\ : [_] "" (-> usize), |
| 3377 | // \\ [_] "" (-> usize) | 3373 | \\ [_] "" (-> usize) |
| 3378 | // \\ ); | 3374 | \\ ); |
| 3379 | // \\ asm volatile ( | 3375 | \\ asm volatile ( |
| 3380 | // \\ \\ foo | 3376 | \\ \\ foo |
| 3381 | // \\ \\ bar | 3377 | \\ \\ bar |
| 3382 | // \\ : | 3378 | \\ : |
| 3383 | // \\ : [_] "" (0), | 3379 | \\ : [_] "" (0), |
| 3384 | // \\ [_] "" (0) | 3380 | \\ [_] "" (0) |
| 3385 | // \\ ); | 3381 | \\ ); |
| 3386 | // \\ asm volatile ( | 3382 | \\ asm volatile ( |
| 3387 | // \\ \\ foo | 3383 | \\ \\ foo |
| 3388 | // \\ \\ bar | 3384 | \\ \\ bar |
| 3389 | // \\ : | 3385 | \\ ::: "", ""); |
| 3390 | // \\ : | 3386 | \\ asm volatile ( |
| 3391 | // \\ : "", "" | 3387 | \\ \\ foo |
| 3392 | // \\ ); | 3388 | \\ \\ bar |
| 3393 | // \\ asm volatile ( | 3389 | \\ : [_] "" (-> usize), |
| 3394 | // \\ \\ foo | 3390 | \\ [_] "" (-> usize) |
| 3395 | // \\ \\ bar | 3391 | \\ : [_] "" (0), |
| 3396 | // \\ : [_] "" (-> usize), | 3392 | \\ [_] "" (0) |
| 3397 | // \\ [_] "" (-> usize) | 3393 | \\ : "", "" |
| 3398 | // \\ : [_] "" (0), | 3394 | \\ ); |
| 3399 | // \\ [_] "" (0) | 3395 | \\} |
| 3400 | // \\ : "", "" | 3396 | \\ |
| 3401 | // \\ ); | 3397 | ); |
| 3402 | // \\} | 3398 | } |
| 3403 | // \\ | | |
| 3404 | // ); | | |
| 3405 | //} | | |
| 3406 | | 3399 | |
| 3407 | test "zig fmt: multiline string in array" { | 3400 | test "zig fmt: multiline string in array" { |
| 3408 | try testCanonical( | 3401 | try testCanonical( |