Skip to content

Commit

Permalink
feat(tests): Bless outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
byakuren-hijiri committed Jun 28, 2024
1 parent fd6081f commit 4cdd354
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 59 deletions.
71 changes: 71 additions & 0 deletions test/contracts/never-accessed-1.cfg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"projectName": "never-accessed-1",
"functions": [
{
"name": "test",
"cfg": {
"nodes": [
{
"id": 606,
"stmtID": 8043,
"srcEdges": [],
"dstEdges": [
608
]
},
{
"id": 607,
"stmtID": 8048,
"srcEdges": [
608
],
"dstEdges": [
610,
611,
613
]
},
{
"id": 609,
"stmtID": 8047,
"srcEdges": [
610
],
"dstEdges": []
},
{
"id": 612,
"stmtID": 8050,
"srcEdges": [
613
],
"dstEdges": []
}
],
"edges": [
{
"id": 608,
"src": 606,
"dst": 607
},
{
"id": 610,
"src": 607,
"dst": 609
},
{
"id": 611,
"src": 607,
"dst": 8050
},
{
"id": 613,
"src": 607,
"dst": 612
}
]
}
}
],
"contracts": []
}
6 changes: 6 additions & 0 deletions test/contracts/never-accessed-1.expected.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
test/contracts/never-accessed-1.tact:2:5:
1 | fun test(): Int {
> 2 | let a: Int = 20;
^
3 | if (true) { // error: write-only variable
Variable a is never accessed
82 changes: 41 additions & 41 deletions test/contracts/readonly-1.cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,92 +6,92 @@
"cfg": {
"nodes": [
{
"id": 606,
"stmtID": 8051,
"id": 758,
"stmtID": 10053,
"srcEdges": [],
"dstEdges": [
608
760
]
},
{
"id": 607,
"stmtID": 8054,
"id": 759,
"stmtID": 10056,
"srcEdges": [
608
760
],
"dstEdges": [
610
762
]
},
{
"id": 609,
"stmtID": 8057,
"id": 761,
"stmtID": 10059,
"srcEdges": [
610
762
],
"dstEdges": [
612
764
]
},
{
"id": 611,
"stmtID": 8064,
"id": 763,
"stmtID": 10066,
"srcEdges": [
612
764
],
"dstEdges": [
614,
615,
617
766,
767,
769
]
},
{
"id": 613,
"stmtID": 8063,
"id": 765,
"stmtID": 10065,
"srcEdges": [
614
766
],
"dstEdges": []
},
{
"id": 616,
"stmtID": 8066,
"id": 768,
"stmtID": 10068,
"srcEdges": [
617
769
],
"dstEdges": []
}
],
"edges": [
{
"id": 608,
"src": 606,
"dst": 607
"id": 760,
"src": 758,
"dst": 759
},
{
"id": 610,
"src": 607,
"dst": 609
"id": 762,
"src": 759,
"dst": 761
},
{
"id": 612,
"src": 609,
"dst": 611
"id": 764,
"src": 761,
"dst": 763
},
{
"id": 614,
"src": 611,
"dst": 613
"id": 766,
"src": 763,
"dst": 765
},
{
"id": 615,
"src": 611,
"dst": 8066
"id": 767,
"src": 763,
"dst": 10068
},
{
"id": 617,
"src": 611,
"dst": 616
"id": 769,
"src": 763,
"dst": 768
}
]
}
Expand Down
32 changes: 16 additions & 16 deletions test/contracts/readonly-2.cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,42 @@
"cfg": {
"nodes": [
{
"id": 762,
"stmtID": 10059,
"id": 914,
"stmtID": 12061,
"srcEdges": [],
"dstEdges": [
764
916
]
},
{
"id": 763,
"stmtID": 10062,
"id": 915,
"stmtID": 12064,
"srcEdges": [
764
916
],
"dstEdges": [
766
918
]
},
{
"id": 765,
"stmtID": 10064,
"id": 917,
"stmtID": 12066,
"srcEdges": [
766
918
],
"dstEdges": []
}
],
"edges": [
{
"id": 764,
"src": 762,
"dst": 763
"id": 916,
"src": 914,
"dst": 915
},
{
"id": 766,
"src": 763,
"dst": 765
"id": 918,
"src": 915,
"dst": 917
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions test/contracts/zero-address.cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"cfg": {
"nodes": [
{
"id": 911,
"stmtID": 12053,
"id": 1063,
"stmtID": 14055,
"srcEdges": [],
"dstEdges": []
}
Expand Down

0 comments on commit 4cdd354

Please sign in to comment.