| 1 | const std = @import("std"); |
| 2 | const expect = std.testing.expect; |
| 3 | const expectEqual = std.testing.expectEqual; |
| 4 | |
| 5 | test "@src" { |
| 6 | try doTheTest(); |
| 7 | } |
| 8 | |
| 9 | fn doTheTest() !void { |
| 10 | const src = @src(); |
| 11 | |
| 12 | try expectEqual(10, src.line); |
| 13 | try expectEqual(17, src.column); |
| 14 | try expect(std.mem.endsWith(u8, src.fn_name, "doTheTest")); |
| 15 | try expect(std.mem.endsWith(u8, src.file, "test_src_builtin.zig")); |
| 16 | } |
| 17 | |
| 18 | // test |