Commit 23b901d45a

Robin Voetter <robin@voetter.nl>
2019-12-09 20:23:36
Add typeOf/TypeOf render test
1 parent 20a3011
Changed files (1)
lib
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 {