Skip to content

Commit 069cf9d

Browse files
hvitvedmichaelnebel
authored andcommitted
C#: Exclude stubs in GetAnOutNode.ql test
1 parent cbd21ed commit 069cf9d

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

csharp/ql/test/library-tests/dataflow/global/GetAnOutNode.ql

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,10 @@ private class DataFlowCallAdjusted extends TDataFlowCall {
1313
}
1414
}
1515

16-
private class NodeAdjusted extends TNode {
17-
string toString() { result = this.(DataFlow::Node).toString() }
18-
19-
Location getLocation() {
20-
exists(Location l |
21-
l = this.(DataFlow::Node).getLocation() and
22-
if l instanceof SourceLocation then result = l else result instanceof EmptyLocation
23-
)
24-
}
16+
private class SourceNode extends DataFlow::Node {
17+
SourceNode() { this.getLocation().getFile().fromSource() }
2518
}
2619

27-
from DataFlowCallAdjusted call, NodeAdjusted n, ReturnKind kind
20+
from DataFlowCallAdjusted call, SourceNode n, ReturnKind kind
2821
where n = getAnOutNode(call, kind)
2922
select call, kind, n

0 commit comments

Comments
 (0)