Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how-to-test-a-property.md #232

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ We will see how to test a smart contract with Echidna. The target is the followi

```Solidity
contract Token{
mapping(address => uint) public balances;
function airdrop() public{
mapping(address => uint) public balances;
function airdrop() public{
balances[msg.sender] = 1000;
}
function consume() public{
Expand Down Expand Up @@ -101,12 +101,13 @@ $ echidna-test contract.sol --contract MyContract
The following summarizes the run of Echidna on our example:

```Solidity
contract TestToken is Token{
contract TestToken is Token {
constructor() public {}
function echidna_balance_under_1000() public view returns(bool){

function echidna_balance_under_1000() public view returns(bool) {
return balances[msg.sender] <= 1000;
}
}
}
}
```

```bash
Expand Down