foundry-template/test/Foo.t.sol

27 lines
709 B
Solidity
Raw Permalink Normal View History

2022-07-16 11:36:29 +00:00
// SPDX-License-Identifier: UNLICENSED
2023-02-25 13:52:34 +00:00
pragma solidity >=0.8.19 <0.9.0;
2022-07-16 11:36:29 +00:00
import { Test, console } from "forge-std/Test.sol";
2022-07-16 11:36:29 +00:00
import { Deploy } from "../script/Deploy.s.sol";
import { DeploymentConfig } from "../script/DeploymentConfig.s.sol";
2023-05-23 18:45:52 +00:00
import { Foo } from "../src/Foo.sol";
contract FooTest is Test {
2023-05-26 08:51:58 +00:00
Foo internal foo;
DeploymentConfig internal deploymentConfig;
address internal deployer;
2023-05-23 18:45:52 +00:00
2023-04-01 06:46:18 +00:00
function setUp() public virtual {
Deploy deployment = new Deploy();
(foo, deploymentConfig) = deployment.run();
2022-07-16 11:36:29 +00:00
}
function test_Example() external {
console.log("Hello World");
2023-05-23 18:45:52 +00:00
uint256 x = 42;
assertEq(foo.id(x), x, "value mismatch");
2022-07-16 11:36:29 +00:00
}
}