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

Skip to content

Commit 7244b9f

Browse files
committed
Python points-to: Update some more expected test results.
1 parent 315fe0a commit 7244b9f

7 files changed

Lines changed: 39 additions & 18 deletions

File tree

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
| 41 | ControlFlowNode for func1 | Function func1 | test.py:23 |
22
| 42 | ControlFlowNode for func2 | Function wrapper | test.py:10 |
3-
| 43 | ControlFlowNode for func3 | Function wrapper | test.py:17 |

python/ql/test/library-tests/PointsTo/general/GlobalPointsTo.expected

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232
| Class X | 36 | ControlFlowNode for classmethod() | classmethod() |
3333
| Class X | 37 | ControlFlowNode for FunctionExpr | Function method1 |
3434
| Class X | 37 | ControlFlowNode for method1 | classmethod() |
35+
| Class X | 40 | ControlFlowNode for deco() | Function method2 |
3536
| Class X | 41 | ControlFlowNode for FunctionExpr | Function method2 |
37+
| Class X | 41 | ControlFlowNode for method2 | Function method2 |
3638
| Module pointsto_test | 17 | ControlFlowNode for Attribute | list object |
3739
| Module pointsto_test | 17 | ControlFlowNode for Compare | bool False |
3840
| Module pointsto_test | 17 | ControlFlowNode for Compare | bool True |
@@ -81,7 +83,9 @@
8183
| Module pointsto_test | 64 | ControlFlowNode for dict | int 7 |
8284
| Module pointsto_test | 65 | ControlFlowNode for tuple | builtin-class tuple |
8385
| Module pointsto_test | 66 | ControlFlowNode for tuple | builtin-class tuple |
86+
| Module pointsto_test | 69 | ControlFlowNode for Attribute | Attribute |
8487
| Module pointsto_test | 69 | ControlFlowNode for X | class X |
88+
| Module pointsto_test | 70 | ControlFlowNode for Attribute | Function method2 |
8589
| Module pointsto_test | 70 | ControlFlowNode for X | class X |
8690
| Module pointsto_test | 72 | ControlFlowNode for ImportExpr | Module abc |
8791
| Module pointsto_test | 72 | ControlFlowNode for ImportMember | Function abstractmethod |
@@ -99,6 +103,7 @@
99103
| Module pointsto_test | 79 | ControlFlowNode for Tuple | Tuple |
100104
| Module pointsto_test | 79 | ControlFlowNode for object | builtin-class object |
101105
| Module pointsto_test | 79 | ControlFlowNode for type | builtin-class type |
106+
| Module pointsto_test | 79 | ControlFlowNode for type() | type() |
102107
| Module pointsto_test | 81 | ControlFlowNode for FunctionExpr | Function k |
103108
| Module pointsto_test | 81 | ControlFlowNode for k | Function k |
104109
| Module pointsto_test | 88 | ControlFlowNode for FunctionExpr | Function outer |

python/ql/test/library-tests/PointsTo/general/LocalPointsTo.expected

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@
4949
| 36 | ControlFlowNode for classmethod() | classmethod() |
5050
| 37 | ControlFlowNode for FunctionExpr | Function method1 |
5151
| 37 | ControlFlowNode for method1 | classmethod() |
52+
| 40 | ControlFlowNode for deco() | Function method2 |
5253
| 41 | ControlFlowNode for FunctionExpr | Function method2 |
54+
| 41 | ControlFlowNode for method2 | Function method2 |
5355
| 44 | ControlFlowNode for FunctionExpr | Function deco |
5456
| 44 | ControlFlowNode for deco | Function deco |
5557
| 47 | ControlFlowNode for v1 | class C |
@@ -89,7 +91,9 @@
8991
| 64 | ControlFlowNode for dict | int 7 |
9092
| 65 | ControlFlowNode for tuple | builtin-class tuple |
9193
| 66 | ControlFlowNode for tuple | builtin-class tuple |
94+
| 69 | ControlFlowNode for Attribute | Attribute |
9295
| 69 | ControlFlowNode for X | class X |
96+
| 70 | ControlFlowNode for Attribute | Function method2 |
9397
| 70 | ControlFlowNode for X | class X |
9498
| 72 | ControlFlowNode for ImportExpr | Module abc |
9599
| 72 | ControlFlowNode for ImportMember | Function abstractmethod |
@@ -107,6 +111,7 @@
107111
| 79 | ControlFlowNode for Tuple | Tuple |
108112
| 79 | ControlFlowNode for object | builtin-class object |
109113
| 79 | ControlFlowNode for type | builtin-class type |
114+
| 79 | ControlFlowNode for type() | type() |
110115
| 81 | ControlFlowNode for FunctionExpr | Function k |
111116
| 81 | ControlFlowNode for k | Function k |
112117
| 82 | ControlFlowNode for C | class C |
@@ -121,6 +126,7 @@
121126
| 85 | ControlFlowNode for Tuple | Tuple |
122127
| 85 | ControlFlowNode for object | builtin-class object |
123128
| 85 | ControlFlowNode for type | builtin-class type |
129+
| 85 | ControlFlowNode for type() | type() |
124130
| 88 | ControlFlowNode for FunctionExpr | Function outer |
125131
| 88 | ControlFlowNode for outer | Function outer |
126132
| 89 | ControlFlowNode for IntegerLiteral | int 1 |
@@ -247,7 +253,7 @@
247253
| 180 | ControlFlowNode for Derived4 | class Derived4 |
248254
| 182 | ControlFlowNode for FunctionExpr | Function __init__ |
249255
| 182 | ControlFlowNode for __init__ | Function __init__ |
250-
| 183 | ControlFlowNode for Attribute | super().x |
256+
| 183 | ControlFlowNode for Attribute | int 1 |
251257
| 183 | ControlFlowNode for Derived4 | class Derived4 |
252258
| 183 | ControlFlowNode for self | self |
253259
| 183 | ControlFlowNode for super | builtin-class super |
@@ -335,6 +341,7 @@
335341
| 263 | ControlFlowNode for Attribute | int 3 |
336342
| 263 | ControlFlowNode for IntegerLiteral | int 3 |
337343
| 263 | ControlFlowNode for self | self |
344+
| 264 | ControlFlowNode for Attribute | int 0 |
338345
| 264 | ControlFlowNode for Attribute | int 3 |
339346
| 264 | ControlFlowNode for self | self |
340347
| 267 | ControlFlowNode for Derived4 | class Derived4 |
@@ -349,7 +356,6 @@
349356
| 273 | ControlFlowNode for self | self |
350357
| 275 | ControlFlowNode for FunctionExpr | Function add_node |
351358
| 275 | ControlFlowNode for add_node | Function add_node |
352-
| 276 | ControlFlowNode for Attribute | Dict |
353359
| 276 | ControlFlowNode for IntegerLiteral | int 0 |
354360
| 276 | ControlFlowNode for Subscript | int 0 |
355361
| 276 | ControlFlowNode for self | self |

python/ql/test/library-tests/PointsTo/general/LocalPointsToType.expected

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@
5151
| 36 | ControlFlowNode for classmethod() | classmethod() | builtin-class classmethod |
5252
| 37 | ControlFlowNode for FunctionExpr | Function method1 | builtin-class function |
5353
| 37 | ControlFlowNode for method1 | classmethod() | builtin-class classmethod |
54+
| 40 | ControlFlowNode for deco() | Function method2 | builtin-class function |
5455
| 41 | ControlFlowNode for FunctionExpr | Function method2 | builtin-class function |
56+
| 41 | ControlFlowNode for method2 | Function method2 | builtin-class function |
5557
| 44 | ControlFlowNode for FunctionExpr | Function deco | builtin-class function |
5658
| 44 | ControlFlowNode for deco | Function deco | builtin-class function |
5759
| 47 | ControlFlowNode for v1 | class C | builtin-class type |
@@ -92,7 +94,9 @@
9294
| 64 | ControlFlowNode for dict | int 7 | builtin-class int |
9395
| 65 | ControlFlowNode for tuple | builtin-class tuple | builtin-class type |
9496
| 66 | ControlFlowNode for tuple | builtin-class tuple | builtin-class type |
97+
| 69 | ControlFlowNode for Attribute | Attribute | builtin-class method |
9598
| 69 | ControlFlowNode for X | class X | builtin-class type |
99+
| 70 | ControlFlowNode for Attribute | Function method2 | builtin-class function |
96100
| 70 | ControlFlowNode for X | class X | builtin-class type |
97101
| 72 | ControlFlowNode for ImportExpr | Module abc | builtin-class module |
98102
| 72 | ControlFlowNode for ImportMember | Function abstractmethod | builtin-class function |
@@ -110,6 +114,7 @@
110114
| 79 | ControlFlowNode for Tuple | Tuple | builtin-class tuple |
111115
| 79 | ControlFlowNode for object | builtin-class object | builtin-class type |
112116
| 79 | ControlFlowNode for type | builtin-class type | builtin-class type |
117+
| 79 | ControlFlowNode for type() | type() | builtin-class type |
113118
| 81 | ControlFlowNode for FunctionExpr | Function k | builtin-class function |
114119
| 81 | ControlFlowNode for k | Function k | builtin-class function |
115120
| 82 | ControlFlowNode for C | class C | builtin-class type |
@@ -124,6 +129,7 @@
124129
| 85 | ControlFlowNode for Tuple | Tuple | builtin-class tuple |
125130
| 85 | ControlFlowNode for object | builtin-class object | builtin-class type |
126131
| 85 | ControlFlowNode for type | builtin-class type | builtin-class type |
132+
| 85 | ControlFlowNode for type() | type() | builtin-class type |
127133
| 88 | ControlFlowNode for FunctionExpr | Function outer | builtin-class function |
128134
| 88 | ControlFlowNode for outer | Function outer | builtin-class function |
129135
| 89 | ControlFlowNode for IntegerLiteral | int 1 | builtin-class int |
@@ -250,7 +256,7 @@
250256
| 180 | ControlFlowNode for Derived4 | class Derived4 | builtin-class type |
251257
| 182 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function |
252258
| 182 | ControlFlowNode for __init__ | Function __init__ | builtin-class function |
253-
| 183 | ControlFlowNode for Attribute | super().x | builtin-class method |
259+
| 183 | ControlFlowNode for Attribute | int 1 | builtin-class int |
254260
| 183 | ControlFlowNode for Derived4 | class Derived4 | builtin-class type |
255261
| 183 | ControlFlowNode for self | self | class Derived4 |
256262
| 183 | ControlFlowNode for super | builtin-class super | builtin-class type |
@@ -338,6 +344,7 @@
338344
| 263 | ControlFlowNode for Attribute | int 3 | builtin-class int |
339345
| 263 | ControlFlowNode for IntegerLiteral | int 3 | builtin-class int |
340346
| 263 | ControlFlowNode for self | self | class G |
347+
| 264 | ControlFlowNode for Attribute | int 0 | builtin-class int |
341348
| 264 | ControlFlowNode for Attribute | int 3 | builtin-class int |
342349
| 264 | ControlFlowNode for self | self | class G |
343350
| 267 | ControlFlowNode for Derived4 | class Derived4 | builtin-class type |
@@ -352,7 +359,6 @@
352359
| 273 | ControlFlowNode for self | self | class DiGraph |
353360
| 275 | ControlFlowNode for FunctionExpr | Function add_node | builtin-class function |
354361
| 275 | ControlFlowNode for add_node | Function add_node | builtin-class function |
355-
| 276 | ControlFlowNode for Attribute | Dict | builtin-class dict |
356362
| 276 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int |
357363
| 276 | ControlFlowNode for Subscript | int 0 | builtin-class int |
358364
| 276 | ControlFlowNode for self | self | class DiGraph |

python/ql/test/library-tests/PointsTo/guarded/PointsTo.expected

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,28 @@
4343
| test.py | 215 | ControlFlowNode for s | class C2 | 202 |
4444
| test.py | 220 | ControlFlowNode for s | int 0 | 219 |
4545
| test.py | 234 | ControlFlowNode for f | int 0 | 233 |
46-
| test.py | 252 | ControlFlowNode for Attribute | int 1 | 242 |
47-
| test.py | 254 | ControlFlowNode for Attribute | int 2 | 245 |
4846
| test.py | 272 | ControlFlowNode for x | int 1 | 271 |
49-
| test.py | 276 | ControlFlowNode for Attribute | int 1 | 271 |
5047
| test.py | 286 | ControlFlowNode for y | NoneType None | 281 |
5148
| test.py | 297 | ControlFlowNode for y | NoneType None | 291 |
5249
| test.py | 301 | ControlFlowNode for x | NoneType None | 291 |
5350
| test.py | 308 | ControlFlowNode for z | int 7 | 305 |
5451
| test.py | 314 | ControlFlowNode for b | NoneType None | 311 |
52+
| test.py | 330 | ControlFlowNode for Attribute | NoneType None | 324 |
53+
| test.py | 330 | ControlFlowNode for Attribute | int 3 | 324 |
54+
| test.py | 332 | ControlFlowNode for Attribute | NoneType None | 322 |
5555
| test.py | 332 | ControlFlowNode for Attribute | int 4 | 322 |
56-
| test.py | 339 | ControlFlowNode for Attribute | int 4 | 322 |
56+
| test.py | 337 | ControlFlowNode for Attribute | NoneType None | 324 |
57+
| test.py | 337 | ControlFlowNode for Attribute | int 3 | 324 |
58+
| test.py | 345 | ControlFlowNode for Attribute | NoneType None | 324 |
59+
| test.py | 345 | ControlFlowNode for Attribute | int 3 | 324 |
60+
| test.py | 347 | ControlFlowNode for Attribute | NoneType None | 322 |
5761
| test.py | 347 | ControlFlowNode for Attribute | int 4 | 322 |
62+
| test.py | 357 | ControlFlowNode for g1 | float 7.0 | 356 |
5863
| test.py | 369 | ControlFlowNode for g2 | float 2.0 | 366 |
5964
| test.py | 382 | ControlFlowNode for g3 | bool True | 379 |
6065
| test.py | 389 | ControlFlowNode for g4 | int 7 | 396 |
6166
| test.py | 408 | ControlFlowNode for x | int 1 | 404 |
6267
| test.py | 420 | ControlFlowNode for Attribute | NoneType None | 418 |
63-
| test.py | 427 | ControlFlowNode for Attribute | NoneType None | 418 |
6468
| test.py | 435 | ControlFlowNode for y | int 1 | 433 |
6569
| type_test.py | 5 | ControlFlowNode for d | Dict | 2 |
6670
| type_test.py | 14 | ControlFlowNode for x | int 0 | 11 |

python/ql/test/library-tests/PointsTo/guarded/PointsToWithType.expected

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,28 @@
4343
| test.py | 215 | ControlFlowNode for s | class C2 | builtin-class type | 202 |
4444
| test.py | 220 | ControlFlowNode for s | int 0 | builtin-class int | 219 |
4545
| test.py | 234 | ControlFlowNode for f | int 0 | builtin-class int | 233 |
46-
| test.py | 252 | ControlFlowNode for Attribute | int 1 | builtin-class int | 242 |
47-
| test.py | 254 | ControlFlowNode for Attribute | int 2 | builtin-class int | 245 |
4846
| test.py | 272 | ControlFlowNode for x | int 1 | builtin-class int | 271 |
49-
| test.py | 276 | ControlFlowNode for Attribute | int 1 | builtin-class int | 271 |
5047
| test.py | 286 | ControlFlowNode for y | NoneType None | builtin-class NoneType | 281 |
5148
| test.py | 297 | ControlFlowNode for y | NoneType None | builtin-class NoneType | 291 |
5249
| test.py | 301 | ControlFlowNode for x | NoneType None | builtin-class NoneType | 291 |
5350
| test.py | 308 | ControlFlowNode for z | int 7 | builtin-class int | 305 |
5451
| test.py | 314 | ControlFlowNode for b | NoneType None | builtin-class NoneType | 311 |
52+
| test.py | 330 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 324 |
53+
| test.py | 330 | ControlFlowNode for Attribute | int 3 | builtin-class int | 324 |
54+
| test.py | 332 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 322 |
5555
| test.py | 332 | ControlFlowNode for Attribute | int 4 | builtin-class int | 322 |
56-
| test.py | 339 | ControlFlowNode for Attribute | int 4 | builtin-class int | 322 |
56+
| test.py | 337 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 324 |
57+
| test.py | 337 | ControlFlowNode for Attribute | int 3 | builtin-class int | 324 |
58+
| test.py | 345 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 324 |
59+
| test.py | 345 | ControlFlowNode for Attribute | int 3 | builtin-class int | 324 |
60+
| test.py | 347 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 322 |
5761
| test.py | 347 | ControlFlowNode for Attribute | int 4 | builtin-class int | 322 |
62+
| test.py | 357 | ControlFlowNode for g1 | float 7.0 | builtin-class float | 356 |
5863
| test.py | 369 | ControlFlowNode for g2 | float 2.0 | builtin-class float | 366 |
5964
| test.py | 382 | ControlFlowNode for g3 | bool True | builtin-class bool | 379 |
6065
| test.py | 389 | ControlFlowNode for g4 | int 7 | builtin-class int | 396 |
6166
| test.py | 408 | ControlFlowNode for x | int 1 | builtin-class int | 404 |
6267
| test.py | 420 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 418 |
63-
| test.py | 427 | ControlFlowNode for Attribute | NoneType None | builtin-class NoneType | 418 |
6468
| test.py | 435 | ControlFlowNode for y | int 1 | builtin-class int | 433 |
6569
| type_test.py | 5 | ControlFlowNode for d | Dict | builtin-class dict | 2 |
6670
| type_test.py | 14 | ControlFlowNode for x | int 0 | builtin-class int | 11 |

python/ql/test/library-tests/PointsTo/inheritance/MetaClass.expected

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@
55
| class Derived4 | builtin-class type |
66
| class Derived5 | builtin-class type |
77
| class Derived6 | builtin-class type |
8-
| class Missing1 | builtin-class type |
9-
| class Missing2 | builtin-class type |
10-
| class Missing3 | builtin-class type |
118
| class Wrong1 | builtin-class type |
129
| class Wrong2 | builtin-class type |

0 commit comments

Comments
 (0)