Python: Add test for call.getFunction().refersTo

Showing that
`call.getFunction().refersTo(func)` gives different results from
`call = func.getACall()`
This commit is contained in:
Rasmus Wriedt Larsen
2020-05-04 20:49:19 +02:00
parent a01ef83312
commit 7b8b4af6d2
4 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
| 19 | ControlFlowNode for f() | Function f |
| 21 | ControlFlowNode for f() | Function f |
| 25 | ControlFlowNode for Attribute() | Function n |
| 33 | ControlFlowNode for Attribute() | Function foo |
| 34 | ControlFlowNode for Attribute() | Function foo |

View File

@@ -0,0 +1,5 @@
import python
from CallNode call, FunctionObject func
where call.getFunction().refersTo(func)
select call.getLocation().getStartLine(), call.toString(), func.toString()