Skip to content

Commit

Permalink
Add Echidna test skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmichalis committed Apr 1, 2023
1 parent 0238c77 commit 7d93ba5
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/echidna/EchidnaUtils.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

library EchidnaUtils {
event AssertionFailed(string msg, uint256 expected, uint256 actualValue);

function between(uint256 random, uint256 low, uint256 high) internal pure returns (uint256) {
return low + random % (high - low);
}
}
21 changes: 21 additions & 0 deletions test/echidna/PairEchidna.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "./EchidnaUtils.sol";

contract PairEchidna {
bool isSetup;

function setup() private {
isSetup = true;
}

function echidnaTestTodo() public {
//************************* Pre-Conditions *************************/
if (!isSetup) setup();

//************************* Action *************************/

//************************* Post-Conditions *************************/
}
}
3 changes: 3 additions & 0 deletions test/echidna/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testMode: assertion
corpusDir: corpus
testLimit: 50000

0 comments on commit 7d93ba5

Please sign in to comment.