contracts/lib/forge-std/test/Vm.t.sol 659 B raw
1
// SPDX-License-Identifier: MIT
2
pragma solidity >=0.8.0 <0.9.0;
3
4
import {Test} from "../src/Test.sol";
5
import {Vm, VmSafe} from "../src/Vm.sol";
6
7
// These tests ensure that functions are never accidentally removed from a Vm interface, or
8
// inadvertently moved between Vm and VmSafe. These tests must be updated each time a function is
9
// added to or removed from Vm or VmSafe.
10
contract VmTest is Test {
11
    function test_VmInterfaceId() public pure {
12
        assertEq(type(Vm).interfaceId, bytes4(0xe835828d), "Vm");
13
    }
14
15
    function test_VmSafeInterfaceId() public pure {
16
        assertEq(type(VmSafe).interfaceId, bytes4(0x1b0ca4fb), "VmSafe");
17
    }
18
}