Add typeOf/TypeOf render test

This commit is contained in:
Robin Voetter 2019-12-09 20:23:36 +01:00 committed by Andrew Kelley
parent 20a3011def
commit 23b901d45a
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -1,3 +1,14 @@
// TODO: Remove condition after deprecating 'typeOf'. See https://github.com/ziglang/zig/issues/1348
test "zig fmt: change @typeOf to @TypeOf" {
try testTransform(
\\const a = @typeOf(@as(usize, 10));
\\
,
\\const a = @TypeOf(@as(usize, 10));
\\
);
}
test "zig fmt: comptime struct field" {
try testCanonical(
\\const Foo = struct {