diff --git a/test/lib/LibCodeGen.requireContractName.t.sol b/test/lib/LibCodeGen.requireContractName.t.sol index bc450fa..acaac78 100644 --- a/test/lib/LibCodeGen.requireContractName.t.sol +++ b/test/lib/LibCodeGen.requireContractName.t.sol @@ -23,6 +23,9 @@ contract LibCodeGenRequireContractNameTest is Test { this.callRequireContractName(name); } + /// Rejection is asserted as the whole error, selector and argument: every + /// rejection below pins that the revert carries the name that was rejected, + /// so a build script that generates many files says which one it choked on. function assertRejected(string memory name) internal { vm.expectRevert(abi.encodeWithSelector(InvalidContractName.selector, name)); this.callRequireContractName(name); @@ -119,13 +122,6 @@ contract LibCodeGenRequireContractNameTest is Test { assertRejected(string(hex"466f6f00")); } - /// The rejection carries the name that was rejected, so a build script that - /// generates many files says which one it choked on. - function testRequireContractNameErrorCarriesTheName() external { - vm.expectRevert(abi.encodeWithSelector(InvalidContractName.selector, "sub/Foo")); - this.callRequireContractName("sub/Foo"); - } - /// Accepting a name is exactly accepting every one of its bytes, so an /// accepted name can be rebuilt from the identifier alphabet and nothing /// else. Fuzzed so that the check is not merely rejecting the handful of