aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2024-08-07 14:05:55 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-08-08 07:47:14 -0700
commitcf87a1a7cf57123aad533a73d8e0fa4d4916a674 (patch)
treeeec5763a778319fbc8aafe991a2ff504223fdc48 /test/behavior
parentca012e5b69b9ff275c6e366c0348219d1c816f18 (diff)
downloadzig-cf87a1a7cf57123aad533a73d8e0fa4d4916a674.tar.gz
zig-cf87a1a7cf57123aad533a73d8e0fa4d4916a674.zip
language: add module name field to `@src`
closes #20963
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/src.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/behavior/src.zig b/test/behavior/src.zig
index ebf6ab06b0..4a617ae153 100644
--- a/test/behavior/src.zig
+++ b/test/behavior/src.zig
@@ -7,11 +7,13 @@ fn doTheTest() !void {
try expect(std.mem.endsWith(u8, src.file, "src.zig"));
try expect(src.fn_name[src.fn_name.len] == 0);
try expect(src.file[src.file.len] == 0);
+ if (!std.mem.eql(u8, src.module, "test") and !std.mem.eql(u8, src.module, "root")) return error.TestFailure;
}
const std = @import("std");
const builtin = @import("builtin");
const expect = std.testing.expect;
+const expectEqualStrings = std.testing.expectEqualStrings;
test "@src" {
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO