chore: forge init

This commit is contained in:
Jayden Windle
2022-11-29 14:04:44 -08:00
commit 13743607d0
6 changed files with 101 additions and 0 deletions

24
test/Counter.t.sol Normal file
View File

@@ -0,0 +1,24 @@
// 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);
}
}