Skip to content

Commit 9631b65

Browse files
committed
Refactor Ratpack test
1 parent e0e5bb1 commit 9631b65

File tree

1 file changed

+4
-11
lines changed
  • java/ql/test/library-tests/frameworks/ratpack

1 file changed

+4
-11
lines changed
Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import java
22
import semmle.code.java.dataflow.TaintTracking
33
import semmle.code.java.dataflow.FlowSources
4-
import TestUtilities.InlineExpectationsTest
4+
import TestUtilities.InlineFlowTest
55

66
module Config implements DataFlow::ConfigSig {
77
predicate isSource(DataFlow::Node n) {
@@ -17,17 +17,10 @@ module Config implements DataFlow::ConfigSig {
1717

1818
module Flow = TaintTracking::Global<Config>;
1919

20-
class HasFlowTest extends InlineExpectationsTest {
20+
class HasFlowTest extends InlineFlowTest {
2121
HasFlowTest() { this = "HasFlowTest" }
2222

23-
override string getARelevantTag() { result = "hasTaintFlow" }
23+
override predicate hasValueFlow(DataFlow::Node src, DataFlow::Node sink) { none() }
2424

25-
override predicate hasActualResult(Location location, string element, string tag, string value) {
26-
tag = "hasTaintFlow" and
27-
exists(DataFlow::Node sink | Flow::flowTo(sink) |
28-
sink.getLocation() = location and
29-
element = sink.toString() and
30-
value = ""
31-
)
32-
}
25+
override predicate hasTaintFlow(DataFlow::Node src, DataFlow::Node sink) { Flow::flow(src, sink) }
3326
}

0 commit comments

Comments
 (0)