Skip to content

Commit

Permalink
test: add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
daejunpark committed Sep 24, 2024
1 parent 4e04da5 commit 610c8dc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/expected/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -2354,6 +2354,17 @@
"num_bounded_loops": null
}
],
"test/Solver.t.sol:SolverTest": [
{
"name": "check_dynamic_array_overflow()",
"exitcode": 0,
"num_models": 0,
"models": null,
"num_paths": null,
"time": null,
"num_bounded_loops": null
}
],
"test/StaticContexts.t.sol:StaticContextsTest": [
{
"name": "check_create2_fails()",
Expand Down
13 changes: 13 additions & 0 deletions tests/regression/test/Solver.t.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity >=0.8.0 <0.9.0;

import "forge-std/Test.sol";
import {SymTest} from "halmos-cheatcodes/SymTest.sol";

contract SolverTest is SymTest, Test {
uint[] numbers;

function check_dynamic_array_overflow() public {
numbers = new uint[](5); // shouldn't generate loop bounds warning
}
}

0 comments on commit 610c8dc

Please sign in to comment.