From 23b901d45af9c1c3c662fc851be5d75154538c8e Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Mon, 9 Dec 2019 20:23:36 +0100 Subject: [PATCH] Add typeOf/TypeOf render test --- lib/std/zig/parser_test.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig index a47e2bdc7e..fd7c841d86 100644 --- a/lib/std/zig/parser_test.zig +++ b/lib/std/zig/parser_test.zig @@ -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 {