C#: Use shared logic in NodeGraph.ql test

This commit is contained in:
Tom Hvitved
2021-08-19 11:33:24 +02:00
parent d405284d36
commit ab2bc38789
2 changed files with 14457 additions and 4934 deletions

View File

@@ -1,11 +1,9 @@
/**
* @kind graph
*/
import csharp
import Common
import semmle.code.csharp.controlflow.internal.ControlFlowGraphImplShared::TestOutput
query predicate edges(
SourceControlFlowNode node, SourceControlFlowNode successor, string attr, string val
) {
exists(ControlFlow::SuccessorType t | successor = node.getASuccessorByType(t) |
attr = "semmle.label" and
val = t.toString()
)
}
private class MyRelevantNode extends RelevantNode, SourceControlFlowNode { }