inline Location into the shared implementation of InlineExpectationsTest

This commit is contained in:
erik-krogh
2022-12-22 11:09:43 +01:00
parent 08e9d3391f
commit b3dd50bc36
9 changed files with 172 additions and 164 deletions

View File

@@ -6,14 +6,14 @@
private import python as PY
private import codeql.util.test.InlineExpectationsTest
private module Impl implements InlineExpectationsTestSig {
/**
* A class representing line comments in Python. As this is the only form of comment Python
* permits, we simply reuse the `Comment` class.
*/
class ExpectationComment = PY::Comment;
class Location = PY::Location;
/**
* A class representing line comments in Python. As this is the only form of comment Python
* permits, we simply reuse the `Comment` class.
*/
private class ExpectationComment extends PY::Comment {
predicate hasLocationInfo(string file, int line, int column, int endLine, int endColumn) {
this.getLocation().hasLocationInfo(file, line, column, endLine, endColumn)
}
}
import Make<Impl>
import Make<ExpectationComment>