mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
521 B
25 lines
521 B
2 years ago
|
// SPDX-License-Identifier: UNLICENSED
|
||
|
pragma solidity ^0.8.13;
|
||
|
|
||
|
import "forge-std/Test.sol";
|
||
|
import "../src/Counter.sol";
|
||
|
|
||
|
contract CounterTest is Test {
|
||
|
Counter public counter;
|
||
|
|
||
|
function setUp() public {
|
||
|
counter = new Counter();
|
||
|
counter.setNumber(0);
|
||
|
}
|
||
|
|
||
|
function testIncrement() public {
|
||
|
counter.increment();
|
||
|
assertEq(counter.number(), 1);
|
||
|
}
|
||
|
|
||
|
function testSetNumber(uint256 x) public {
|
||
|
counter.setNumber(x);
|
||
|
assertEq(counter.number(), x);
|
||
|
}
|
||
|
}
|