Add transform test

This commit is contained in:
LemonBoy 2019-12-31 13:16:49 +01:00
parent 0ccac79c8e
commit e99209baf0

View File

@ -9,6 +9,18 @@ test "zig fmt: change @typeOf to @TypeOf" {
);
}
// TODO: Remove nakedcc/stdcallcc once zig 0.6.0 is released. See https://github.com/ziglang/zig/pull/3977
test "zig fmt: convert nakedcc/stdcallcc into callconv(...)" {
try testTransform(
\\nakedcc fn foo1() void {}
\\stdcallcc fn foo2() void {}
,
\\fn foo1() callconv(.Naked) void {}
\\fn foo2() callconv(.Stdcall) void {}
\\
);
}
test "zig fmt: comptime struct field" {
try testCanonical(
\\const Foo = struct {