mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
QL-for-QL: Rewrite inline expectation tests to use parameterized module
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -2,12 +2,10 @@ import ql
|
||||
import codeql_ql.dataflow.DataFlow
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class GetAStringValueTest extends InlineExpectationsTest {
|
||||
GetAStringValueTest() { this = "getAStringValue" }
|
||||
module GetAStringValueTest implements TestSig {
|
||||
string getARelevantTag() { result = "getAStringValue" }
|
||||
|
||||
override string getARelevantTag() { result = "getAStringValue" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(Expr e |
|
||||
e = any(Call c).getAnArgument() and
|
||||
tag = "getAStringValue" and
|
||||
@@ -17,3 +15,5 @@ class GetAStringValueTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<GetAStringValueTest>
|
||||
|
||||
Reference in New Issue
Block a user