Added Foundry
CI / Foundry project (push) Waiting to run

This commit is contained in:
2024-08-13 07:17:48 +08:00
parent 3e5079217a
commit 5e4bf13d0d
8 changed files with 39 additions and 66 deletions
-24
View File
@@ -1,24 +0,0 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Test, console} from "forge-std/Test.sol";
import {Counter} from "../src/Counter.sol";
contract CounterTest is Test {
Counter public counter;
function setUp() public {
counter = new Counter();
counter.setNumber(0);
}
function test_Increment() public {
counter.increment();
assertEq(counter.number(), 1);
}
function testFuzz_SetNumber(uint256 x) public {
counter.setNumber(x);
assertEq(counter.number(), x);
}
}