Apply suggestions from code review

Co-authored-by: Tom Hvitved <hvitved@github.com>
This commit is contained in:
Asger F
2025-02-11 16:53:13 +01:00
committed by GitHub
parent 56ff9351f2
commit 80e79b11f7

View File

@@ -659,7 +659,7 @@ module TestPostProcessing {
private string getRelativePathTo(string absolutePath) {
exists(Input::Location loc |
loc.hasLocationInfo(absolutePath, _, _, _, _) and
result = Input2::getRelativeUrl(loc).splitAt(":", 0)
parseLocationString(Input2::getRelativeUrl(loc), result, _, _, _, _)
)
}
@@ -692,7 +692,7 @@ module TestPostProcessing {
abstract string getRelativeUrl();
abstract string toString();
final string toString() { result = this.getRelativeUrl() }
abstract predicate hasLocationInfo(string file, int sl, int sc, int el, int ec);
}
@@ -731,12 +731,10 @@ module TestPostProcessing {
module TestImpl2 implements InlineExpectationsTestSig {
final class Location = TestLocation;
class ExpectationComment instanceof Input::ExpectationComment {
string getContents() { result = super.getContents() }
final private class ExpectationCommentFinal = Input::ExpectationComment;
class ExpectationComment extends ExpectationCommentFinal {
Location getLocation() { result = MkInputLocation(super.getLocation()) }
string toString() { result = super.toString() }
}
}