Skip to content

Commit

Permalink
add calldata tests for nested arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Sep 13, 2024
1 parent 37c7423 commit 36bbc3f
Show file tree
Hide file tree
Showing 2 changed files with 178 additions and 68 deletions.
128 changes: 74 additions & 54 deletions tests/expected/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -1203,16 +1203,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Beep_1_excluding_pure()",
"exitcode": 4,
"name": "check_createInt()",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Beep_1_including_pure()",
"name": "check_createInt256()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1221,16 +1221,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Beep_2_excluding_pure()",
"exitcode": 4,
"name": "check_createString()",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Beep_2_including_pure()",
"name": "check_createUint()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1239,52 +1239,54 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Dummy_fail()",
"exitcode": 3,
"name": "check_createUint256()",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Fallback()",
"exitcode": 0,
"num_models": 0,
"name": "check_enableSymbolicStorage_fail()",
"exitcode": 1,
"num_models": 1,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_1_fail()",
"exitcode": 1,
"num_models": 40,
"name": "check_enableSymbolicStorage_nonexistent()",
"exitcode": 3,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_1_pass()",
"name": "check_enableSymbolicStorage_pass(uint256)",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
}
],
"test/HalmosCheatCode.t.sol:HalmosCreateCalldataTest": [
{
"name": "check_createCalldata_Mock_2_excluding_view_fail()",
"exitcode": 1,
"num_models": 40,
"name": "check_createCalldata_Beep_1_excluding_pure()",
"exitcode": 4,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_2_excluding_view_pass()",
"name": "check_createCalldata_Beep_1_including_pure()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1293,16 +1295,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_2_including_view_fail()",
"exitcode": 1,
"num_models": 42,
"name": "check_createCalldata_Beep_2_excluding_pure()",
"exitcode": 4,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_2_including_view_pass()",
"name": "check_createCalldata_Beep_2_including_pure()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1311,16 +1313,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_3_fail()",
"exitcode": 1,
"num_models": 40,
"name": "check_createCalldata_Dummy_fail()",
"exitcode": 3,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_3_pass()",
"name": "check_createCalldata_Fallback()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1329,16 +1331,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_4_excluding_view_fail()",
"name": "check_createCalldata_Mock_1_fail()",
"exitcode": 1,
"num_models": 40,
"num_models": 18,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_4_excluding_view_pass()",
"name": "check_createCalldata_Mock_1_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1347,16 +1349,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_4_including_view_fail()",
"name": "check_createCalldata_Mock_2_excluding_view_fail()",
"exitcode": 1,
"num_models": 42,
"num_models": 18,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_4_including_view_pass()",
"name": "check_createCalldata_Mock_2_excluding_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1365,16 +1367,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_interface_excluding_view_fail()",
"name": "check_createCalldata_Mock_2_including_view_fail()",
"exitcode": 1,
"num_models": 40,
"num_models": 20,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_interface_excluding_view_pass()",
"name": "check_createCalldata_Mock_2_including_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1383,16 +1385,16 @@
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_interface_including_view_fail()",
"name": "check_createCalldata_Mock_3_fail()",
"exitcode": 1,
"num_models": 42,
"num_models": 18,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_interface_including_view_pass()",
"name": "check_createCalldata_Mock_3_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1401,16 +1403,16 @@
"num_bounded_loops": null
},
{
"name": "check_createInt()",
"exitcode": 0,
"num_models": 0,
"name": "check_createCalldata_Mock_4_excluding_view_fail()",
"exitcode": 1,
"num_models": 18,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createInt256()",
"name": "check_createCalldata_Mock_4_excluding_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1419,16 +1421,16 @@
"num_bounded_loops": null
},
{
"name": "check_createString()",
"exitcode": 0,
"num_models": 0,
"name": "check_createCalldata_Mock_4_including_view_fail()",
"exitcode": 1,
"num_models": 20,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createUint()",
"name": "check_createCalldata_Mock_4_including_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1437,7 +1439,16 @@
"num_bounded_loops": null
},
{
"name": "check_createUint256()",
"name": "check_createCalldata_Mock_interface_excluding_view_fail()",
"exitcode": 1,
"num_models": 18,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_Mock_interface_excluding_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand All @@ -1446,25 +1457,34 @@
"num_bounded_loops": null
},
{
"name": "check_enableSymbolicStorage_fail()",
"name": "check_createCalldata_Mock_interface_including_view_fail()",
"exitcode": 1,
"num_models": 1,
"num_models": 20,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_enableSymbolicStorage_nonexistent()",
"exitcode": 3,
"name": "check_createCalldata_Mock_interface_including_view_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_enableSymbolicStorage_pass(uint256)",
"name": "check_createCalldata_NestedArrays_1_fail()",
"exitcode": 1,
"num_models": 541,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
},
{
"name": "check_createCalldata_NestedArrays_1_pass()",
"exitcode": 0,
"num_models": 0,
"models": null,
Expand Down
Loading

0 comments on commit 36bbc3f

Please sign in to comment.