-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added test (don't know if it works yet)
- Loading branch information
1 parent
b78e6a7
commit 5142202
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import "./immutable-3.sol"; | ||
|
||
contract C { | ||
D d; | ||
constructor() { | ||
d = new D(0); | ||
} | ||
function set(uint256 n, uint256 m) external { | ||
d = new D(n); | ||
d.set(m); | ||
} | ||
function echidna_test() public returns (bool) { | ||
return d.state(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
contract D { | ||
uint256 public immutable n; | ||
bool public state = true; | ||
constructor(uint256 _n) { | ||
n = _n; | ||
} | ||
function set(uint256 m) external { | ||
if (n+1 != 101) revert(); | ||
if (m+1 != 104) revert(); | ||
state = false; | ||
} | ||
} |