11// SPDX-License-Identifier: GNU AGPLv3
22pragma solidity ^ 0.8.0 ;
33
4- import "ds-test/test.sol " ;
5- import "forge-std/Vm.sol " ;
4+ import "forge-std/Test.sol " ;
65
76import "@contracts/Heap.sol " ;
87
9- contract TestHeap is DSTest {
8+ contract TestHeap is Test {
109 using BasicHeap for BasicHeap.Heap;
1110
12- Vm public hevm = Vm (HEVM_ADDRESS);
13-
1411 uint256 public TESTED_SIZE = 50 ;
1512 address [] public accounts;
1613 address public ADDR_ZERO = address (0 );
@@ -36,25 +33,25 @@ contract TestHeap is DSTest {
3633 }
3734
3835 function testShouldNotInsertAccountWithZeroValue () public {
39- hevm .expectRevert (abi.encodeWithSignature ("WrongValue() " ));
36+ vm .expectRevert (abi.encodeWithSignature ("WrongValue() " ));
4037 heap.insert (accounts[0 ], 0 );
4138
4239 assertEq (heap.getSize (), 0 );
4340 }
4441
4542 function testShouldNotInsertZeroAddress () public {
46- hevm .expectRevert (abi.encodeWithSignature ("AddressIsZero() " ));
43+ vm .expectRevert (abi.encodeWithSignature ("AddressIsZero() " ));
4744 heap.insert (address (0 ), 10 );
4845 }
4946
5047 function testShouldInsertSeveralTimesTheSameAccount () public {
5148 heap.insert (accounts[0 ], 1 );
52- hevm .expectRevert (abi.encodeWithSignature ("AccountAlreadyInserted() " ));
49+ vm .expectRevert (abi.encodeWithSignature ("AccountAlreadyInserted() " ));
5350 heap.insert (accounts[0 ], 2 );
5451 }
5552
5653 function testShouldNotRemoveAccountThatDoesNotExist () public {
57- hevm .expectRevert (abi.encodeWithSignature ("AccountDoesNotExist() " ));
54+ vm .expectRevert (abi.encodeWithSignature ("AccountDoesNotExist() " ));
5855 heap.remove (accounts[0 ]);
5956 }
6057
0 commit comments