mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
18 lines
362 B
Zig
18 lines
362 B
Zig
const std = @import("std");
|
|
const expect = std.testing.expect;
|
|
|
|
test "@src" {
|
|
try doTheTest();
|
|
}
|
|
|
|
fn doTheTest() !void {
|
|
const src = @src();
|
|
|
|
try expect(src.line == 9);
|
|
try expect(src.column == 17);
|
|
try expect(std.mem.endsWith(u8, src.fn_name, "doTheTest"));
|
|
try expect(std.mem.endsWith(u8, src.file, "test_src_builtin.zig"));
|
|
}
|
|
|
|
// test
|