File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed
python/ql/test/library-tests/PointsTo/general Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 66| Class Base2 | 178 | ControlFlowNode for x | int 1 |
77| Class Derived4 | 182 | ControlFlowNode for FunctionExpr | Function __init__ |
88| Class Derived4 | 182 | ControlFlowNode for __init__ | Function __init__ |
9+ | Class DiGraph | 272 | ControlFlowNode for FunctionExpr | Function __init__ |
10+ | Class DiGraph | 272 | ControlFlowNode for __init__ | Function __init__ |
11+ | Class DiGraph | 275 | ControlFlowNode for FunctionExpr | Function add_node |
12+ | Class DiGraph | 275 | ControlFlowNode for add_node | Function add_node |
913| Class E | 195 | ControlFlowNode for FunctionExpr | Function _internal |
1014| Class E | 195 | ControlFlowNode for _internal | Function _internal |
1115| Class E | 201 | ControlFlowNode for _internal | Function _internal |
176180| Module pointsto_test | 254 | ControlFlowNode for object | builtin-class object |
177181| Module pointsto_test | 267 | ControlFlowNode for Derived4 | class Derived4 |
178182| Module pointsto_test | 267 | ControlFlowNode for Derived4() | Derived4() |
183+ | Module pointsto_test | 270 | ControlFlowNode for ClassExpr | class DiGraph |
184+ | Module pointsto_test | 270 | ControlFlowNode for DiGraph | class DiGraph |
185+ | Module pointsto_test | 270 | ControlFlowNode for object | builtin-class object |
Original file line number Diff line number Diff line change 339339| 264 | ControlFlowNode for self | self |
340340| 267 | ControlFlowNode for Derived4 | class Derived4 |
341341| 267 | ControlFlowNode for Derived4() | Derived4() |
342+ | 270 | ControlFlowNode for ClassExpr | class DiGraph |
343+ | 270 | ControlFlowNode for DiGraph | class DiGraph |
344+ | 270 | ControlFlowNode for object | builtin-class object |
345+ | 272 | ControlFlowNode for FunctionExpr | Function __init__ |
346+ | 272 | ControlFlowNode for __init__ | Function __init__ |
347+ | 273 | ControlFlowNode for Attribute | Dict |
348+ | 273 | ControlFlowNode for Dict | Dict |
349+ | 273 | ControlFlowNode for self | self |
350+ | 275 | ControlFlowNode for FunctionExpr | Function add_node |
351+ | 275 | ControlFlowNode for add_node | Function add_node |
352+ | 276 | ControlFlowNode for Attribute | Dict |
353+ | 276 | ControlFlowNode for IntegerLiteral | int 0 |
354+ | 276 | ControlFlowNode for Subscript | int 0 |
355+ | 276 | ControlFlowNode for self | self |
Original file line number Diff line number Diff line change 342342| 264 | ControlFlowNode for self | self | class G |
343343| 267 | ControlFlowNode for Derived4 | class Derived4 | builtin-class type |
344344| 267 | ControlFlowNode for Derived4() | Derived4() | class Derived4 |
345+ | 270 | ControlFlowNode for ClassExpr | class DiGraph | builtin-class type |
346+ | 270 | ControlFlowNode for DiGraph | class DiGraph | builtin-class type |
347+ | 270 | ControlFlowNode for object | builtin-class object | builtin-class type |
348+ | 272 | ControlFlowNode for FunctionExpr | Function __init__ | builtin-class function |
349+ | 272 | ControlFlowNode for __init__ | Function __init__ | builtin-class function |
350+ | 273 | ControlFlowNode for Attribute | Dict | builtin-class dict |
351+ | 273 | ControlFlowNode for Dict | Dict | builtin-class dict |
352+ | 273 | ControlFlowNode for self | self | class DiGraph |
353+ | 275 | ControlFlowNode for FunctionExpr | Function add_node | builtin-class function |
354+ | 275 | ControlFlowNode for add_node | Function add_node | builtin-class function |
355+ | 276 | ControlFlowNode for Attribute | Dict | builtin-class dict |
356+ | 276 | ControlFlowNode for IntegerLiteral | int 0 | builtin-class int |
357+ | 276 | ControlFlowNode for Subscript | int 0 | builtin-class int |
358+ | 276 | ControlFlowNode for self | self | class DiGraph |
Original file line number Diff line number Diff line change @@ -265,3 +265,13 @@ def meth(self):
265265
266266# Self can only be of a class that is instantiated.
267267Derived4 ()
268+
269+
270+ class DiGraph (object ):
271+
272+ def __init__ (self ):
273+ self .pred = {}
274+
275+ def add_node (self , n ):
276+ self .pred [n ] = 0
277+
You can’t perform that action at this time.
0 commit comments