Skip to content

Commit 9633f00

Browse files
committed
QL-for-QL: Rewrite inline expectation tests to use parameterized module
1 parent 8f599fa commit 9633f00

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
failures
2+
testFailures

ql/ql/test/dataflow/getAStringValue/getAStringValue.ql

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import ql
22
import codeql_ql.dataflow.DataFlow
33
import TestUtilities.InlineExpectationsTest
44

5-
class GetAStringValueTest extends InlineExpectationsTest {
6-
GetAStringValueTest() { this = "getAStringValue" }
5+
module GetAStringValueTest implements TestSig {
6+
string getARelevantTag() { result = "getAStringValue" }
77

8-
override string getARelevantTag() { result = "getAStringValue" }
9-
10-
override predicate hasActualResult(Location location, string element, string tag, string value) {
8+
predicate hasActualResult(Location location, string element, string tag, string value) {
119
exists(Expr e |
1210
e = any(Call c).getAnArgument() and
1311
tag = "getAStringValue" and
@@ -17,3 +15,5 @@ class GetAStringValueTest extends InlineExpectationsTest {
1715
)
1816
}
1917
}
18+
19+
import MakeTest<GetAStringValueTest>

0 commit comments

Comments
 (0)