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