From 4d688c3d92817db3c0d381fec5940e8d4eca1559 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Fri, 26 May 2023 11:51:58 +0300 Subject: [PATCH] test: deploy "foo" in "setUp" --- test/Foo.t.sol | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Foo.t.sol b/test/Foo.t.sol index 9e61f17..736b7d8 100644 --- a/test/Foo.t.sol +++ b/test/Foo.t.sol @@ -14,12 +14,12 @@ interface IERC20 { /// @dev If this is your first time with Forge, read this tutorial in the Foundry Book: /// https://book.getfoundry.sh/forge/writing-tests contract FooTest is PRBTest, StdCheats { - // Instantiate the contract-under-test - Foo internal foo = new Foo(); + Foo internal foo; - /// @dev An optional function invoked before each test case is run. + /// @dev A function invoked before each test case is run. function setUp() public virtual { - // solhint-disable-previous-line no-empty-blocks + // Instantiate the contract-under-test. + foo = new Foo(); } /// @dev Basic test. Run it with `forge test -vvv` to see the console log.