Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc0b022

Browse files
committed
Python: Add test-cases for BuiltinFunction and BuiltinMethod
1 parent f624754 commit fc0b022

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

python/ql/test/library-tests/PointsTo/calls/Argument.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@
1313
| 25 | 1 | ControlFlowNode for z | Function C.n |
1414
| 33 | 0 | ControlFlowNode for IntegerLiteral | Function D.foo |
1515
| 34 | 0 | ControlFlowNode for IntegerLiteral | Function D.foo |
16+
| 37 | 0 | ControlFlowNode for l | builtin method append |
17+
| 37 | 1 | ControlFlowNode for IntegerLiteral | builtin method append |
18+
| 38 | 0 | ControlFlowNode for l | Builtin-function len |

python/ql/test/library-tests/PointsTo/calls/CallPointsTo.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
| 33 | ControlFlowNode for Attribute() | Function D.foo |
99
| 34 | ControlFlowNode for Attribute() | Function D.foo |
1010
| 34 | ControlFlowNode for D() | class D |
11+
| 37 | ControlFlowNode for Attribute() | Method(builtin method append, List) |
12+
| 38 | ControlFlowNode for len() | Builtin-function len |

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
| 33 | ControlFlowNode for Attribute() | Function D.foo |
1111
| 34 | ControlFlowNode for Attribute() | Function D.foo |
1212
| 34 | ControlFlowNode for D() | class D |
13+
| 37 | ControlFlowNode for Attribute() | Method(builtin method append, List) |
14+
| 37 | ControlFlowNode for Attribute() | builtin method append |
15+
| 38 | ControlFlowNode for len() | Builtin-function len |

python/ql/test/library-tests/PointsTo/calls/test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,7 @@ def foo(arg):
3232

3333
D.foo(1)
3434
D().foo(2)
35+
36+
l = [1,2,3]
37+
l.append(4)
38+
len(l)

0 commit comments

Comments
 (0)