mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Ruby: Update remaining inline expectation tests to use the paramterized module
This commit is contained in:
@@ -15,12 +15,10 @@ DataFlow::LocalSourceNode track(DataFlow::CallNode source) {
|
||||
result = track(TypeTracker::end(), source)
|
||||
}
|
||||
|
||||
class TypeTrackingFlowTest extends InlineExpectationsTest {
|
||||
TypeTrackingFlowTest() { this = "TypeTrackingFlowTest" }
|
||||
module TypeTrackingFlowTest implements TestSig {
|
||||
string getARelevantTag() { result = "hasValueFlow" }
|
||||
|
||||
override string getARelevantTag() { result = "hasValueFlow" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
exists(DataFlow::Node sink, DataFlow::Node source |
|
||||
defaultSink(sink) and
|
||||
track(source).flowsTo(sink) and
|
||||
@@ -31,3 +29,5 @@ class TypeTrackingFlowTest extends InlineExpectationsTest {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<TypeTrackingFlowTest>
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
failures
|
||||
testFailures
|
||||
| array_flow.rb:107:10:107:13 | ...[...] | Unexpected result: hasValueFlow=11.2 |
|
||||
| array_flow.rb:179:28:179:46 | # $ hasValueFlow=19 | Missing result:hasValueFlow=19 |
|
||||
| array_flow.rb:180:28:180:46 | # $ hasValueFlow=19 | Missing result:hasValueFlow=19 |
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
failures
|
||||
testFailures
|
||||
| captured_variables.rb:9:14:9:14 | x | Fixed missing result:hasValueFlow=1.2 |
|
||||
| captured_variables.rb:16:14:16:14 | x | Fixed missing result:hasValueFlow=1.3 |
|
||||
| instance_variables.rb:20:16:20:33 | # $ hasValueFlow=7 | Missing result:hasValueFlow=7 |
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
failures
|
||||
testFailures
|
||||
| hash_flow.rb:65:21:65:40 | # $ hasValueFlow=3.3 | Missing result:hasValueFlow=3.3 |
|
||||
| hash_flow.rb:66:21:66:49 | # $ SPURIOUS hasValueFlow=3.3 | Missing result:hasValueFlow=3.3 |
|
||||
| hash_flow.rb:114:10:114:17 | ...[...] | Unexpected result: hasValueFlow=7.2 |
|
||||
|
||||
Reference in New Issue
Block a user