mirror of
https://github.com/vacp2p/foundry-template.git
synced 2026-01-09 07:08:02 -05:00
build: upgrade to prb-test v0.1.3
build: upgrade to latest forge-std test: use "StdCheats" instead of "Cheats" test: use "console2" instead of "console"
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
// SPDX-License-Identifier: UNLICENSED
|
||||
pragma solidity >=0.8.4;
|
||||
|
||||
import { Cheats } from "forge-std/Cheats.sol";
|
||||
import { console } from "forge-std/console.sol";
|
||||
import { StdCheats } from "forge-std/StdCheats.sol";
|
||||
import { console2 } from "forge-std/console2.sol";
|
||||
import { PRBTest } from "@prb/test/PRBTest.sol";
|
||||
|
||||
/// @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
|
||||
contract ContractTest is PRBTest, Cheats {
|
||||
contract ContractTest is PRBTest, StdCheats {
|
||||
function setUp() public {
|
||||
// solhint-disable-previous-line no-empty-blocks
|
||||
}
|
||||
|
||||
/// @dev Run Forge with `-vvvv` to see console logs.
|
||||
function testExample() public {
|
||||
console.log("Hello World");
|
||||
console2.log("Hello World");
|
||||
assertTrue(true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user