Skip to content

Commit d67cfb7

Browse files
committed
Added example contracts
1 parent 0a764bb commit d67cfb7

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
pragma solidity ^0.8.0;
2+
3+
contract Flag {
4+
5+
bool flag = false;
6+
7+
function flip() public {
8+
flag = !flag;
9+
}
10+
11+
function get() public returns (bool) {
12+
return flag;
13+
}
14+
15+
function test_fail() public {
16+
assert(false);
17+
}
18+
}
19+
20+
21+
contract EchidnaTest {
22+
Flag f;
23+
24+
constructor() {
25+
f = new Flag();
26+
}
27+
28+
function test_flag_is_false() public {
29+
assert(f.get() == false);
30+
}
31+
32+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
testMode: assertion
2+
testLimit: 50000
3+
multi-abi: true

0 commit comments

Comments
 (0)