Skip to content

Commit 7b8b4af

Browse files
committed
Python: Add test for call.getFunction().refersTo
Showing that `call.getFunction().refersTo(func)` gives different results from `call = func.getACall()`
1 parent a01ef83 commit 7b8b4af

4 files changed

Lines changed: 10 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
| 19 | ControlFlowNode for f() | Function f |
2+
| 21 | ControlFlowNode for f() | Function f |
3+
| 25 | ControlFlowNode for Attribute() | Function n |
4+
| 33 | ControlFlowNode for Attribute() | Function foo |
5+
| 34 | ControlFlowNode for Attribute() | Function foo |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import python
2+
3+
from CallNode call, FunctionObject func
4+
where call.getFunction().refersTo(func)
5+
select call.getLocation().getStartLine(), call.toString(), func.toString()

python/ql/test/library-tests/PointsTo/calls/Call.expected renamed to python/ql/test/library-tests/PointsTo/calls/GetACall.expected

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)