2022-07-16 11:36:29 +00:00
|
|
|
// SPDX-License-Identifier: UNLICENSED
|
|
|
|
pragma solidity >=0.8.4;
|
|
|
|
|
|
|
|
import { PRBTest } from "@prb/test/PRBTest.sol";
|
2023-01-07 09:50:02 +00:00
|
|
|
import { console2 } from "forge-std/console2.sol";
|
2022-10-31 16:34:49 +00:00
|
|
|
import { StdCheats } from "forge-std/StdCheats.sol";
|
2022-07-16 11:36:29 +00:00
|
|
|
|
|
|
|
/// @dev See the "Writing Tests" section in the Foundry Book if this is your first time with Forge.
|
|
|
|
/// https://book.getfoundry.sh/forge/writing-tests
|
2022-11-18 19:50:45 +00:00
|
|
|
contract FooTest is PRBTest, StdCheats {
|
2023-01-03 19:18:14 +00:00
|
|
|
/// @dev An optional function invoked before each test case is run
|
2022-07-16 11:36:29 +00:00
|
|
|
function setUp() public {
|
|
|
|
// solhint-disable-previous-line no-empty-blocks
|
|
|
|
}
|
|
|
|
|
2023-01-07 09:47:59 +00:00
|
|
|
/// @dev Simple test. Run Forge with `-vvvv` to see console logs.
|
|
|
|
function test_Example() external {
|
2022-10-29 13:37:43 +00:00
|
|
|
console2.log("Hello World");
|
2022-07-16 11:36:29 +00:00
|
|
|
assertTrue(true);
|
|
|
|
}
|
2023-01-07 09:47:59 +00:00
|
|
|
|
|
|
|
/// @dev Test that fuzzes an unsigned integer. Run Forge with `-vvvv` to see console logs.
|
|
|
|
function testFuzz_Example(uint256 x) external {
|
|
|
|
vm.assume(x != 0);
|
|
|
|
console2.log("x", x);
|
|
|
|
assertTrue(x > 0);
|
|
|
|
}
|
2022-07-16 11:36:29 +00:00
|
|
|
}
|