Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: increase test coverage to 100% #31

Merged
merged 13 commits into from
Dec 12, 2023
Merged
2 changes: 0 additions & 2 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
- [❱ extensions](solidity/interfaces/extensions/README.md)
- [IAccountingExtension](solidity/interfaces/extensions/IAccountingExtension.sol/interface.IAccountingExtension.md)
- [IBondEscalationAccounting](solidity/interfaces/extensions/IBondEscalationAccounting.sol/interface.IBondEscalationAccounting.md)
- [❱ external](solidity/interfaces/external/README.md)
- [IWETH9](solidity/interfaces/external/IWETH9.sol/interface.IWETH9.md)
- [❱ modules](solidity/interfaces/modules/README.md)
- [❱ dispute](solidity/interfaces/modules/dispute/README.md)
- [IBondEscalationModule](solidity/interfaces/modules/dispute/IBondEscalationModule.sol/interface.IBondEscalationModule.md)
Expand Down
6 changes: 2 additions & 4 deletions solidity/test/integration/Finalization.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
address internal _finalizer = makeAddr('finalizer');
IOracle.Request internal _request;
IOracle.Response internal _response;
bytes32 _requestId;

Check warning on line 12 in solidity/test/integration/Finalization.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (16.x)

Explicitly mark visibility of state
bytes32 _responseId;

Check warning on line 13 in solidity/test/integration/Finalization.t.sol

View workflow job for this annotation

GitHub Actions / Run Linters (16.x)

Explicitly mark visibility of state

function setUp() public override {
super.setUp();
Expand Down Expand Up @@ -153,7 +153,7 @@
* @notice Test to check that finalizing a request with a ongoing dispute with revert.
*/
function test_revertFinalizeInDisputeWindow(uint256 _block) public {
vm.assume(_block < _expectedDeadline + _baseDisputeWindow);
_block = bound(_block, block.number, _expectedDeadline - _baseDisputeWindow - 1);
address _callbackTarget = makeAddr('target');
vm.etch(_callbackTarget, hex'069420');

Expand All @@ -179,9 +179,7 @@

vm.roll(_block);
vm.prank(_finalizer);
if (_block < _expectedDeadline + _baseDisputeWindow) {
vm.expectRevert(IBondedResponseModule.BondedResponseModule_TooEarlyToFinalize.selector);
}
vm.expectRevert(IBondedResponseModule.BondedResponseModule_TooEarlyToFinalize.selector);
oracle.finalize(_request, _response);
}
/**
Expand Down
2 changes: 1 addition & 1 deletion solidity/test/integration/IntegrationBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {IResolutionModule} from
import {IFinalityModule} from
'@defi-wonderland/prophet-core-contracts/solidity/interfaces/modules/finality/IFinalityModule.sol';

import {IWETH9} from '../../interfaces/external/IWETH9.sol';
import {IWETH9} from '../utils/external/IWETH9.sol';

import {HttpRequestModule, IHttpRequestModule} from '../../contracts/modules/request/HttpRequestModule.sol';
import {BondedResponseModule, IBondedResponseModule} from '../../contracts/modules/response/BondedResponseModule.sol';
Expand Down
182 changes: 0 additions & 182 deletions solidity/test/invariant/InvariantsTest.t.sol

This file was deleted.

Loading
Loading