aboutsummaryrefslogtreecommitdiff
path: root/src-self-hosted/test.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-08-03 17:22:17 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-08-03 17:22:17 -0400
commit5dfcd09e496160054d4f333500d084e35f2fbdd2 (patch)
tree08f4177b091848c1b78ec8e7c1d7973ee230391a /src-self-hosted/test.zig
parent7f6e97cb26ffabbc192e7ccdf44aebbbc3be751d (diff)
downloadzig-5dfcd09e496160054d4f333500d084e35f2fbdd2.tar.gz
zig-5dfcd09e496160054d4f333500d084e35f2fbdd2.zip
self-hosted: watch files and trigger a rebuild
Diffstat (limited to 'src-self-hosted/test.zig')
-rw-r--r--src-self-hosted/test.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src-self-hosted/test.zig b/src-self-hosted/test.zig
index fc015d572b..487b323e19 100644
--- a/src-self-hosted/test.zig
+++ b/src-self-hosted/test.zig
@@ -212,9 +212,10 @@ pub const TestContext = struct {
Compilation.Event.Fail => |msgs| {
assertOrPanic(msgs.len != 0);
for (msgs) |msg| {
- if (mem.endsWith(u8, msg.getRealPath(), path) and mem.eql(u8, msg.text, text)) {
- const first_token = msg.getTree().tokens.at(msg.span.first);
- const last_token = msg.getTree().tokens.at(msg.span.first);
+ if (mem.endsWith(u8, msg.realpath, path) and mem.eql(u8, msg.text, text)) {
+ const span = msg.getSpan();
+ const first_token = msg.getTree().tokens.at(span.first);
+ const last_token = msg.getTree().tokens.at(span.first);
const start_loc = msg.getTree().tokenLocationPtr(0, first_token);
if (start_loc.line + 1 == line and start_loc.column + 1 == column) {
return;