mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 08:14:43 +01:00
Provide local paths for file tests. (#2830)
The intent of this change is that instead of paths looking like `explorer/testdata/foo/bar.carbon` (repo-relative), they're now just `bar.carbon` (local). The consequence is that paths should be a bit more durable in various environments, and just paths should be shorter and easier to read. The explorer's prelude is an exception to this since it comes from data, rather than being the test target. Due to the change in approaches, it needs the regex again. Uses #2829
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ interface HasF {
|
||||
impl forall [template T:! HasF] T as CallF {
|
||||
// TODO: This case should be accepted, using `ClassWithExternalF.(HasF.F)`.
|
||||
// TODO: The other case should be rejected due to ambiguity.
|
||||
// CHECK:STDERR: COMPILATION ERROR: explorer/testdata/template/fail_name_lookup.carbon:[[@LINE+1]]: class ClassWithExternalF does not have a field named F
|
||||
// CHECK:STDERR: COMPILATION ERROR: fail_name_lookup.carbon:[[@LINE+1]]: class ClassWithExternalF does not have a field named F
|
||||
fn DoIt[self: Self]() { self.F(); }
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ interface GetX {
|
||||
}
|
||||
|
||||
impl forall [template T:! type] T as GetX {
|
||||
// CHECK:STDERR: COMPILATION ERROR: explorer/testdata/template/fail_no_member.carbon:[[@LINE+1]]: member access, unexpected i32 in self.x
|
||||
// CHECK:STDERR: COMPILATION ERROR: fail_no_member.carbon:[[@LINE+1]]: member access, unexpected i32 in self.x
|
||||
fn DoIt[self: Self]() -> i32 { return self.x; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user