QL-for-QL: Rewrite inline expectation tests to use parameterized module

This commit is contained in:
Jeroen Ketema
2023-06-07 13:51:09 +02:00
parent 8f599faf85
commit 9633f00ed1
2 changed files with 7 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
failures
testFailures

View File

@@ -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>