Skip to content

Commit

Permalink
Merge pull request #42 from cyberthirst/fix/varinfo-compare
Browse files Browse the repository at this point in the history
fix test for rw analysis for AnAssign nodes
  • Loading branch information
charles-cooper authored Aug 7, 2024
2 parents 562183a + d31ab50 commit 0bd0709
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/unit/ast/test_ast_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,7 +1255,13 @@ def qux2():
{
"annotation": {"ast_type": "Name", "id": "uint256"},
"ast_type": "AnnAssign",
"target": {"ast_type": "Name", "id": "x"},
"target": {
"ast_type": "Name",
"id": "x",
"variable_reads": [
{"name": "x", "decl_node": {"node_id": 15, "source_id": 0}, "access_path": []}
],
},
"value": {
"ast_type": "Attribute",
"attr": "counter",
Expand Down Expand Up @@ -1300,7 +1306,13 @@ def qux2():
{
"annotation": {"ast_type": "Name", "id": "uint256"},
"ast_type": "AnnAssign",
"target": {"ast_type": "Name", "id": "x"},
"target": {
"ast_type": "Name",
"id": "x",
"variable_reads": [
{"name": "x", "decl_node": {"node_id": 35, "source_id": 0}, "access_path": []}
],
},
"value": {
"ast_type": "Attribute",
"attr": "counter",
Expand All @@ -1317,7 +1329,13 @@ def qux2():
{
"annotation": {"ast_type": "Name", "id": "uint256"},
"ast_type": "AnnAssign",
"target": {"ast_type": "Name", "id": "y"},
"target": {
"ast_type": "Name",
"id": "y",
"variable_reads": [
{"name": "y", "decl_node": {"node_id": 44, "source_id": 0}, "access_path": []}
],
},
"value": {
"ast_type": "Attribute",
"attr": "counter",
Expand Down

0 comments on commit 0bd0709

Please sign in to comment.