Skip to content

Commit

Permalink
test: replace DSTestFull with Test
Browse files Browse the repository at this point in the history
  • Loading branch information
dristpunk committed Nov 28, 2023
1 parent e88aeac commit 629eebb
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 398 deletions.
622 changes: 311 additions & 311 deletions out/Greeter.sol/Greeter.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
},
"dependencies": {
"ds-test": "github:dapphub/ds-test#e282159",
"forge-std": "github:foundry-rs/forge-std#v1.5.6",
"isolmate": "github:defi-wonderland/isolmate#59e1804",
"prb/test": "github:paulrberg/prb-test#a245c71"
"forge-std": "github:foundry-rs/forge-std#v1.7.3",
"isolmate": "github:defi-wonderland/isolmate#59e1804"
},
"devDependencies": {
"@commitlint/cli": "17.0.3",
Expand Down
1 change: 0 additions & 1 deletion remappings.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ds-test/=node_modules/ds-test/src
prb/test/=node_modules/prb/test/src/
forge-std/=node_modules/forge-std/src
isolmate/=node_modules/isolmate/src

Expand Down
8 changes: 4 additions & 4 deletions solidity/test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// SPDX-License-Identifier: MIT
pragma solidity =0.8.19;

import {DSTestFull} from 'test/utils/DSTestFull.sol';
import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';
import {Test} from 'forge-std/Test.sol';

import {Greeter, IGreeter} from 'contracts/Greeter.sol';

contract IntegrationBase is DSTestFull {
contract IntegrationBase is Test {
uint256 internal constant _FORK_BLOCK = 15_452_788;

string internal _initialGreeting = 'hola';
address internal _user = _label('user');
address internal _owner = _label('owner');
address internal _user = makeAddr('user');
address internal _owner = makeAddr('owner');
address internal _daiWhale = 0x42f8CA49E88A8fd8F0bfA2C739e648468b8f9dec;
IERC20 internal _dai = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F);
IGreeter internal _greeter;
Expand Down
10 changes: 5 additions & 5 deletions solidity/test/unit/Greeter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
pragma solidity =0.8.19;

Check warning on line 2 in solidity/test/unit/Greeter.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (16.x)

Found more than One contract per file. 4 contracts found!

import {IERC20} from 'isolmate/interfaces/tokens/IERC20.sol';
import {DSTestFull} from 'test/utils/DSTestFull.sol';
import {Test} from 'forge-std/Test.sol';
import {Greeter, IGreeter} from 'contracts/Greeter.sol';

abstract contract Base is DSTestFull {
address internal _owner = _label('owner');
IERC20 internal _token = IERC20(_mockContract('token'));
abstract contract Base is Test {
address internal _owner = makeAddr('owner');
IERC20 internal _token = IERC20(makeAddr('token'));
string internal _initialGreeting = 'hola';
bytes32 internal _emptyString = keccak256(bytes(''));
Greeter internal _greeter;
Expand Down Expand Up @@ -74,7 +74,7 @@ contract UnitGreeterSetGreeting is Base {
function test_EmitEvent(string memory _greeting) public {
vm.assume(keccak256(bytes(_greeting)) != _emptyString);

_expectEmitNoIndex();
vm.expectEmit(false, false, false, true);
emit GreetingSet(_greeting);

_greeter.setGreeting(_greeting);
Expand Down
67 changes: 0 additions & 67 deletions solidity/test/utils/DSTestFull.sol

This file was deleted.

10 changes: 3 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1073,9 +1073,9 @@ flatted@^2.0.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.2.tgz#4575b21e2bcee7434aa9be662f4b7b5f9c2b5138"
integrity sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==

"forge-std@github:foundry-rs/forge-std#v1.5.6":
version "1.5.6"
resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/e8a047e3f40f13fa37af6fe14e6e06283d9a060e"
"forge-std@github:foundry-rs/forge-std#v1.7.3":
version "1.7.3"
resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/2f112697506eab12d433a65fdc31a639548fe365"

fs-extra@^11.0.0:
version "11.1.1"
Expand Down Expand Up @@ -1942,10 +1942,6 @@ pluralize@^8.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==

"prb/test@github:paulrberg/prb-test#a245c71":
version "0.6.0"
resolved "https://codeload.github.com/paulrberg/prb-test/tar.gz/a245c71edc07643aedfe27df4cc7b21048aa8824"

prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
Expand Down

0 comments on commit 629eebb

Please sign in to comment.