mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
C++: Rewrite local flow test to use TestSig
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
failures
|
||||
testFailures
|
||||
|
||||
@@ -4,12 +4,10 @@ import cpp
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
import semmle.code.cpp.security.FlowSources
|
||||
|
||||
class LocalFlowSourceTest extends InlineExpectationsTest {
|
||||
LocalFlowSourceTest() { this = "LocalFlowSourceTest" }
|
||||
module LocalFlowSourceTest implements TestSig {
|
||||
string getARelevantTag() { result = "local_source" }
|
||||
|
||||
override string getARelevantTag() { result = "local_source" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "local_source" and
|
||||
exists(LocalFlowSource node, int n |
|
||||
n =
|
||||
@@ -29,4 +27,10 @@ class LocalFlowSourceTest extends InlineExpectationsTest {
|
||||
element = node.toString()
|
||||
)
|
||||
}
|
||||
|
||||
predicate hasOptionalResult(Location location, string element, string tag, string value) {
|
||||
none()
|
||||
}
|
||||
}
|
||||
|
||||
import MakeTest<LocalFlowSourceTest>
|
||||
|
||||
Reference in New Issue
Block a user