Skip to content

Commit

Permalink
test: add G3MStrategy to Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Nov 16, 2023
1 parent b5f8de9 commit 9bb71be
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/Setup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import "contracts/Portfolio.sol";

// Strategy to test
import "contracts/strategies/NormalStrategy.sol";
import "contracts/strategies/G3MStrategy.sol";

// Contracts in the test environment
struct SubjectsType {
Expand Down Expand Up @@ -75,6 +76,9 @@ interface ISetup {

/// @dev Returns the normal strategy address.
function normalStrategy() external view returns (address);

/// @dev Returns the G3M strategy address.
function g3mStrategy() external view returns (address);
}

contract Setup is ISetup, Test, ERC1155TokenReceiver {
Expand Down Expand Up @@ -124,6 +128,9 @@ contract Setup is ISetup, Test, ERC1155TokenReceiver {
address(new NormalStrategy(_subjects.portfolio));
vm.label(_subjects.normalStrategy, "normal-strategy");

_subjects.g3mStrategy = address(new G3MStrategy(_subjects.portfolio));
vm.label(_subjects.g3mStrategy, "g3m-strategy");

_ghost_state = GhostType({
actor: address(this),
subject: _subjects.portfolio,
Expand Down Expand Up @@ -516,5 +523,10 @@ contract Setup is ISetup, Test, ERC1155TokenReceiver {
return _subjects.normalStrategy;
}

/// @inheritdoc ISetup
function g3mStrategy() public view override returns (address) {
return _subjects.g3mStrategy;
}

receive() external payable { }
}

0 comments on commit 9bb71be

Please sign in to comment.