Skip to content

Commit

Permalink
test: increase test coverage to 100% (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xmoebius authored Dec 12, 2023
1 parent 56154b4 commit 5fe04cb
Show file tree
Hide file tree
Showing 14 changed files with 517 additions and 1,265 deletions.
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 @@ -153,7 +153,7 @@ contract Integration_Finalization is IntegrationBase {
* @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 @@ contract Integration_Finalization is IntegrationBase {

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

0 comments on commit 5fe04cb

Please sign in to comment.