move behavior tests from test/stage1/ to test/

And fix test cases to make them pass. This is in preparation for
starting to pass behavior tests with self-hosted.
This commit is contained in:
Andrew Kelley
2021-04-29 15:54:04 -07:00
parent 5a02c938da
commit 4307436b99
161 changed files with 49 additions and 1841 deletions
+17
View File
@@ -0,0 +1,17 @@
const std = @import("std");
const expect = std.testing.expect;
test "@src" {
doTheTest();
}
fn doTheTest() void {
const src = @src();
expect(src.line == 9);
expect(src.column == 17);
expect(std.mem.endsWith(u8, src.fn_name, "doTheTest"));
expect(std.mem.endsWith(u8, src.file, "src.zig"));
expect(src.fn_name[src.fn_name.len] == 0);
expect(src.file[src.file.len] == 0);
}