Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions unified/ql/lib/utils/test/InlineExpectationsTest.qll
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Inline expectation tests for unified.
* See `shared/util/codeql/util/test/InlineExpectationsTest.qll`
*/

private import codeql.util.test.InlineExpectationsTest
private import internal.InlineExpectationsTestImpl
import Make<Impl>
21 changes: 21 additions & 0 deletions unified/ql/lib/utils/test/InlineExpectationsTestQuery.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* @kind test-postprocess
*/

private import unified
private import codeql.util.test.InlineExpectationsTest as T
private import internal.InlineExpectationsTestImpl
import T::TestPostProcessing
import T::TestPostProcessing::Make<Impl, Input>

private module Input implements T::TestPostProcessing::InputSig<Impl> {
string getRelativeUrl(Location location) {
exists(File f, int startline, int startcolumn, int endline, int endcolumn |
location.hasLocationInfo(_, startline, startcolumn, endline, endcolumn) and
f = location.getFile()
|
result =
f.getRelativePath() + ":" + startline + ":" + startcolumn + ":" + endline + ":" + endcolumn
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
private import unified as U
private import U
private import codeql.util.test.InlineExpectationsTest

module Impl implements InlineExpectationsTestSig {
class ExpectationComment extends U::Comment {
/** Gets the text inside this comment, without the surrounding comment delimiters. */
string getContents() { result = this.getCommentText() }
}

class Location = U::Location;
}
Loading