From 0a2e48e5a8bab3516e6942c81c2ac235e9e98266 Mon Sep 17 00:00:00 2001 From: thedavidmeister Date: Fri, 23 Aug 2024 22:49:35 +0400 Subject: [PATCH] fix tests --- .../RainterpreterReferenceExternNPE2.sol | 3 +- src/error/ErrParse.sol | 2 +- src/generated/RainterpreterNPE2.pointers.sol | 3 +- ...nterpreterReferenceExternNPE2.pointers.sol | 8 ++--- .../reference/op/LibExternOpIntIncNPE2.sol | 5 ++- .../RainterpreterNPE2.stateOverlay.t.sol | 15 ++++----- ...nterpreterReferenceExternNPE2.intInc.t.sol | 15 +++++---- test/src/lib/op/00/LibOpConstantNP.t.sol | 5 +-- test/src/lib/op/00/LibOpExternNP.t.sol | 31 ++++++++++--------- .../lib/op/bitwise/LibOpShiftBitsLeftNP.t.sol | 4 +-- .../op/bitwise/LibOpShiftBitsRightNP.t.sol | 4 +-- .../LibParseOperand.handleOperand8M1M1.t.sol | 18 ++--------- ....handleOperandDoublePerByteNoDefault.t.sol | 12 ++----- .../LibParseOperand.handleOperandM1M1.t.sol | 12 ++----- ...ParseOperand.handleOperandSingleFull.t.sol | 6 +--- ...and.handleOperandSingleFullNoDefault.t.sol | 6 +--- 16 files changed, 57 insertions(+), 92 deletions(-) diff --git a/src/concrete/extern/RainterpreterReferenceExternNPE2.sol b/src/concrete/extern/RainterpreterReferenceExternNPE2.sol index 9891b0225..bbf347aee 100644 --- a/src/concrete/extern/RainterpreterReferenceExternNPE2.sol +++ b/src/concrete/extern/RainterpreterReferenceExternNPE2.sol @@ -36,6 +36,7 @@ import { OPCODE_FUNCTION_POINTERS } from "../../generated/RainterpreterReferenceExternNPE2.pointers.sol"; import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; +import {console2} from "forge-std/Test.sol"; /// @dev The number of subparser functions available to the parser. This is NOT /// 1:1 with the number of opcodes provided by the extern component of this @@ -253,7 +254,7 @@ contract RainterpreterReferenceExternNPE2 is BaseRainterpreterSubParserNPE2, Bas state, cursor + SUB_PARSER_LITERAL_REPEAT_KEYWORD_BYTES_LENGTH, end ); // We can only repeat a single digit. - if (LibDecimalFloat.lt(signedCoefficient, exponent, 9, 0)) { + if (LibDecimalFloat.gt(signedCoefficient, exponent, 9, 0)) { revert InvalidRepeatCount(); } diff --git a/src/error/ErrParse.sol b/src/error/ErrParse.sol index 2f896c1e6..d6724c63a 100644 --- a/src/error/ErrParse.sol +++ b/src/error/ErrParse.sol @@ -150,4 +150,4 @@ error BadSubParserResult(bytes bytecode); error OpcodeIOOverflow(uint256 offset); /// Thrown when an operand value is larger than the maximum allowed. -error OperandOverflow(); \ No newline at end of file +error OperandOverflow(); diff --git a/src/generated/RainterpreterNPE2.pointers.sol b/src/generated/RainterpreterNPE2.pointers.sol index 0126ad374..6621bead9 100644 --- a/src/generated/RainterpreterNPE2.pointers.sol +++ b/src/generated/RainterpreterNPE2.pointers.sol @@ -15,5 +15,4 @@ bytes32 constant BYTECODE_HASH = bytes32(0xb2bb360cac3a5504625d94621550913d5024d /// By setting these as a constant they can be inlined into the interpreter /// and loaded at eval time for very low gas (~100) due to the compiler /// optimising it to a single `codecopy` to build the in memory bytes array. -bytes constant OPCODE_FUNCTION_POINTERS = - hex"06b407040746091209f90a0b0a1d0a360a780aca0adb0aec0b8e0bcb0c7a0cfe0d4d0e43"; +bytes constant OPCODE_FUNCTION_POINTERS = hex"06b407040746091209f90a0b0a1d0a360a780aca0adb0aec0b8e0bcb0c7a0cfe0d4d0e43"; diff --git a/src/generated/RainterpreterReferenceExternNPE2.pointers.sol b/src/generated/RainterpreterReferenceExternNPE2.pointers.sol index 5bc904d5a..03536a811 100644 --- a/src/generated/RainterpreterReferenceExternNPE2.pointers.sol +++ b/src/generated/RainterpreterReferenceExternNPE2.pointers.sol @@ -9,7 +9,7 @@ pragma solidity =0.8.25; /// @dev Hash of the known bytecode. -bytes32 constant BYTECODE_HASH = bytes32(0xa6f1f65cad3f9e2d59cbe0234b3d684442e6152a23f7966772d1bc21270e4ccf); +bytes32 constant BYTECODE_HASH = bytes32(0xbccd8c9958e6b017765d7f08f8e30d9b0deaa8062599680e7f37776d052c7638); /// @dev The hash of the meta that describes the contract. bytes32 constant DESCRIBED_BY_META_HASH = bytes32(0xadf71693c6ecf3fd560904bc46973d1b6e651440d15366673f9b3984749e7c16); @@ -47,17 +47,17 @@ bytes constant SUB_PARSER_WORD_PARSERS = hex"0775079707a607b607c7"; /// @dev Every two bytes is a function pointer for an operand handler. /// These positional indexes all map to the same indexes looked up in the parse /// meta. -bytes constant OPERAND_HANDLER_FUNCTION_POINTERS = hex"0a370a7c0a370a370a37"; +bytes constant OPERAND_HANDLER_FUNCTION_POINTERS = hex"0abf0b040abf0abf0abf"; /// @dev Every two bytes is a function pointer for a literal parser. /// Literal dispatches are determined by the first byte(s) of the literal /// rather than a full word lookup, and are done with simple conditional /// jumps as the possibilities are limited compared to the number of words we /// have. -bytes constant LITERAL_PARSER_FUNCTION_POINTERS = hex"0a06"; +bytes constant LITERAL_PARSER_FUNCTION_POINTERS = hex"0a8e"; /// @dev The function pointers for the integrity check fns. -bytes constant INTEGRITY_FUNCTION_POINTERS = hex"08ad"; +bytes constant INTEGRITY_FUNCTION_POINTERS = hex"0935"; /// @dev The function pointers known to the interpreter for dynamic dispatch. /// By setting these as a constant they can be inlined into the interpreter diff --git a/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol b/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol index 2cf856c66..043455fc3 100644 --- a/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol +++ b/src/lib/extern/reference/op/LibExternOpIntIncNPE2.sol @@ -4,6 +4,7 @@ pragma solidity ^0.8.25; import {Operand} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {LibSubParse} from "../../../parse/LibSubParse.sol"; import {IInterpreterExternV3} from "rain.interpreter.interface/interface/IInterpreterExternV3.sol"; +import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; /// @dev Opcode index of the extern increment opcode. Needs to be manually kept /// in sync with the extern opcode function pointers. Definitely write tests for @@ -20,7 +21,9 @@ library LibExternOpIntIncNPE2 { //slither-disable-next-line dead-code function run(Operand, uint256[] memory inputs) internal pure returns (uint256[] memory) { for (uint256 i = 0; i < inputs.length; i++) { - ++inputs[i]; + (int256 signedCoefficient, int256 exponent) = LibDecimalFloat.unpack(inputs[i]); + (signedCoefficient, exponent) = LibDecimalFloat.add(signedCoefficient, exponent, 1e37, -37); + inputs[i] = LibDecimalFloat.pack(signedCoefficient, exponent); } return inputs; } diff --git a/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol b/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol index abad6499a..348f55cd4 100644 --- a/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol +++ b/test/src/concrete/RainterpreterNPE2.stateOverlay.t.sol @@ -6,13 +6,14 @@ import {RainterpreterExpressionDeployerNPE2DeploymentTest} from import {FullyQualifiedNamespace, StateNamespace} from "rain.interpreter.interface/interface/IInterpreterStoreV2.sol"; import {EvalV4, SourceIndexV2} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {LibNamespace} from "rain.interpreter.interface/lib/ns/LibNamespace.sol"; +import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; contract RainterpreterNPE2StateOverlayTest is RainterpreterExpressionDeployerNPE2DeploymentTest { /// Show that state overlay can prewarm a get. - function testStateOverlayGet() external { + function testStateOverlayGet() external view { bytes memory bytecode = iDeployer.parse2("_: get(9);"); - uint256 k = 9e18; + uint256 k = LibDecimalFloat.pack(9e37, -37); uint256 v = 42; uint256[] memory stateOverlay = new uint256[](2); stateOverlay[0] = k; @@ -38,11 +39,11 @@ contract RainterpreterNPE2StateOverlayTest is RainterpreterExpressionDeployerNPE } /// Show that state overlay can be overridden by a set in the bytecode. - function testStateOverlaySet() external { + function testStateOverlaySet() external view { bytes memory bytecode = iDeployer.parse2("_:get(9),:set(9 42),_:get(9);"); - uint256 k = 9e18; - uint256 v = 43e18; + uint256 k = LibDecimalFloat.pack(9e37, -37); + uint256 v = LibDecimalFloat.pack(43e37, -37); uint256[] memory stateOverlay = new uint256[](2); stateOverlay[0] = k; stateOverlay[1] = v; @@ -60,10 +61,10 @@ contract RainterpreterNPE2StateOverlayTest is RainterpreterExpressionDeployerNPE ); assertEq(stack.length, 2); - assertEq(stack[0], 42e18); + assertEq(stack[0], LibDecimalFloat.pack(42e37, -37)); assertEq(stack[1], v); assertEq(kvs.length, 2); assertEq(kvs[0], k); - assertEq(kvs[1], 42e18); + assertEq(kvs[1], LibDecimalFloat.pack(42e37, -37)); } } diff --git a/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol b/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol index 960e3ee9d..3f275631d 100644 --- a/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol +++ b/test/src/concrete/RainterpreterReferenceExternNPE2.intInc.t.sol @@ -20,6 +20,7 @@ import {Strings} from "openzeppelin-contracts/contracts/utils/Strings.sol"; import {COMPATIBILITY_V4} from "rain.interpreter.interface/interface/ISubParserV3.sol"; import {OPCODE_EXTERN} from "rain.interpreter.interface/interface/unstable/IInterpreterV4.sol"; import {ExternDispatchConstantsHeightOverflow} from "src/error/ErrSubParse.sol"; +import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; contract RainterpreterReferenceExternNPE2IntIncTest is OpTest { using Strings for address; @@ -38,15 +39,15 @@ contract RainterpreterReferenceExternNPE2IntIncTest is OpTest { ); uint256[] memory expectedStack = new uint256[](3); - expectedStack[0] = 4; - expectedStack[1] = 3; + expectedStack[0] = LibDecimalFloat.pack(4e37, -37); + expectedStack[1] = LibDecimalFloat.pack(3e37, -37); expectedStack[2] = EncodedExternDispatch.unwrap(encodedExternDispatch); checkHappy( // Need the constant in the constant array to be indexable in the operand. "_: 0x000000000000000000000000c7183455a4c133ae270771860664b6b7ec320bb1," // Operand is the constant index of the dispatch. - "three four: extern<0>(2e-18 3e-18);", + "three four: extern<0>(2 3);", expectedStack, "inc 2 3 = 3 4" ); @@ -56,14 +57,12 @@ contract RainterpreterReferenceExternNPE2IntIncTest is OpTest { RainterpreterReferenceExternNPE2 extern = new RainterpreterReferenceExternNPE2(); uint256[] memory expectedStack = new uint256[](2); - expectedStack[0] = 4; - expectedStack[1] = 3; + expectedStack[0] = LibDecimalFloat.pack(4e37, -37); + expectedStack[1] = LibDecimalFloat.pack(3e37, -37); checkHappy( bytes( - string.concat( - "using-words-from ", address(extern).toHexString(), " three four: ref-extern-inc(2e-18 3e-18);" - ) + string.concat("using-words-from ", address(extern).toHexString(), " three four: ref-extern-inc(2 3);") ), expectedStack, "sugared inc 2 3 = 3 4" diff --git a/test/src/lib/op/00/LibOpConstantNP.t.sol b/test/src/lib/op/00/LibOpConstantNP.t.sol index b6da9ca4a..9ca735cf8 100644 --- a/test/src/lib/op/00/LibOpConstantNP.t.sol +++ b/test/src/lib/op/00/LibOpConstantNP.t.sol @@ -18,6 +18,7 @@ import {IInterpreterStoreV2} from "rain.interpreter.interface/interface/IInterpr import {SignedContextV1} from "rain.interpreter.interface/interface/IInterpreterCallerV3.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; import {BadOpOutputsLength} from "src/error/ErrIntegrity.sol"; +import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; /// @title LibOpConstantNPTest /// @notice Test the runtime and integrity time logic of LibOpConstantNP. @@ -95,8 +96,8 @@ contract LibOpConstantNPTest is OpTest { }) ); assertEq(stack.length, 2); - assertEq(stack[0], 1001e15); - assertEq(stack[1], 2e18); + assertEq(stack[0], LibDecimalFloat.pack(1.001e37, -37)); + assertEq(stack[1], LibDecimalFloat.pack(2e37, -37)); assertEq(kvs.length, 0); } diff --git a/test/src/lib/op/00/LibOpExternNP.t.sol b/test/src/lib/op/00/LibOpExternNP.t.sol index 71bfa68aa..6bbe475b3 100644 --- a/test/src/lib/op/00/LibOpExternNP.t.sol +++ b/test/src/lib/op/00/LibOpExternNP.t.sol @@ -17,6 +17,7 @@ import { import {IERC165} from "openzeppelin-contracts/contracts/utils/introspection/IERC165.sol"; import {LibOperand} from "test/lib/operand/LibOperand.sol"; import {LibUint256Array} from "rain.solmem/lib/LibUint256Array.sol"; +import {LibDecimalFloat} from "rain.math.float/src/lib/LibDecimalFloat.sol"; /// @title LibOpExternNPTest /// @notice Test the runtime and integrity time logic of LibOpExternNP. @@ -211,10 +212,10 @@ contract LibOpExternNPTest is OpTest { ); uint256[] memory externInputs = new uint256[](2); - externInputs[0] = 20; - externInputs[1] = 83; + externInputs[0] = LibDecimalFloat.pack(20e36, -36); + externInputs[1] = LibDecimalFloat.pack(83e36, -36); uint256[] memory externOutputs = new uint256[](1); - externOutputs[0] = 99; + externOutputs[0] = LibDecimalFloat.pack(99e36, -36); vm.mockCall( address(extern), abi.encodeWithSelector(IInterpreterExternV3.extern.selector, externDispatch, externInputs), @@ -222,7 +223,7 @@ contract LibOpExternNPTest is OpTest { ); uint256[] memory expectedStack = new uint256[](2); - expectedStack[0] = 99; + expectedStack[0] = LibDecimalFloat.pack(99e36, -36); expectedStack[1] = 0x00000000000000000005001000000000000000000000000000000000deadbeef; checkHappy( @@ -230,7 +231,7 @@ contract LibOpExternNPTest is OpTest { "_: 0x00000000000000000005001000000000000000000000000000000000deadbeef," // Operand is the constant index of the dispatch then the number of outputs. // 2 inputs and 1 output matches the mocked integrity check. - "_: extern<0>(20e-18 83e-18);", + "_: extern<0>(20 83);", expectedStack, "0xdeadbeef 20 83 99" ); @@ -264,19 +265,19 @@ contract LibOpExternNPTest is OpTest { ); uint256[] memory externInputs = new uint256[](3); - externInputs[0] = 1; - externInputs[1] = 2; - externInputs[2] = 3; + externInputs[0] = LibDecimalFloat.pack(1e37, -37); + externInputs[1] = LibDecimalFloat.pack(2e37, -37); + externInputs[2] = LibDecimalFloat.pack(3e37, -37); uint256[] memory externOutputs = new uint256[](3); - externOutputs[0] = 4; - externOutputs[1] = 5; - externOutputs[2] = 6; + externOutputs[0] = LibDecimalFloat.pack(4e37, -37); + externOutputs[1] = LibDecimalFloat.pack(5e37, -37); + externOutputs[2] = LibDecimalFloat.pack(6e37, -37); uint256[] memory expectedStack = new uint256[](4); - expectedStack[0] = 6; - expectedStack[1] = 5; - expectedStack[2] = 4; + expectedStack[0] = LibDecimalFloat.pack(6e37, -37); + expectedStack[1] = LibDecimalFloat.pack(5e37, -37); + expectedStack[2] = LibDecimalFloat.pack(4e37, -37); expectedStack[3] = 0x00000000000000000005001000000000000000000000000000000000deadbeef; vm.mockCall( @@ -295,7 +296,7 @@ contract LibOpExternNPTest is OpTest { "_: 0x00000000000000000005001000000000000000000000000000000000deadbeef," // Operand is the constant index of the dispatch then the number of outputs. // 3 inputs and 3 outputs matches the mocked integrity check. - "four five six: extern<0>(1e-18 2e-18 3e-18);", + "four five six: extern<0>(1 2 3);", expectedStack, "0xdeadbeef 1 2 3 4 5 6" ); diff --git a/test/src/lib/op/bitwise/LibOpShiftBitsLeftNP.t.sol b/test/src/lib/op/bitwise/LibOpShiftBitsLeftNP.t.sol index d6eb40428..a0e7fc651 100644 --- a/test/src/lib/op/bitwise/LibOpShiftBitsLeftNP.t.sol +++ b/test/src/lib/op/bitwise/LibOpShiftBitsLeftNP.t.sol @@ -143,8 +143,6 @@ contract LibOpShiftBitsLeftNPTest is OpTest { "_: bitwise-shift-left<65535>(0);", abi.encodeWithSelector(UnsupportedBitwiseShiftAmount.selector, 65535) ); // Lets go ahead and overflow the operand. - checkUnhappyParse( - "_: bitwise-shift-left<65536>(0);", abi.encodeWithSelector(OperandOverflow.selector) - ); + checkUnhappyParse("_: bitwise-shift-left<65536>(0);", abi.encodeWithSelector(OperandOverflow.selector)); } } diff --git a/test/src/lib/op/bitwise/LibOpShiftBitsRightNP.t.sol b/test/src/lib/op/bitwise/LibOpShiftBitsRightNP.t.sol index cb604e9dc..26a42fc50 100644 --- a/test/src/lib/op/bitwise/LibOpShiftBitsRightNP.t.sol +++ b/test/src/lib/op/bitwise/LibOpShiftBitsRightNP.t.sol @@ -142,8 +142,6 @@ contract LibOpShiftBitsRightNPTest is OpTest { "_: bitwise-shift-right<65535>(0);", abi.encodeWithSelector(UnsupportedBitwiseShiftAmount.selector, 65535) ); // Lets go ahead and overflow the operand. - checkUnhappyParse( - "_: bitwise-shift-right<65536>(0);", abi.encodeWithSelector(OperandOverflow.selector) - ); + checkUnhappyParse("_: bitwise-shift-right<65536>(0);", abi.encodeWithSelector(OperandOverflow.selector)); } } diff --git a/test/src/lib/parse/LibParseOperand.handleOperand8M1M1.t.sol b/test/src/lib/parse/LibParseOperand.handleOperand8M1M1.t.sol index f50282fef..9af5c99f7 100644 --- a/test/src/lib/parse/LibParseOperand.handleOperand8M1M1.t.sol +++ b/test/src/lib/parse/LibParseOperand.handleOperand8M1M1.t.sol @@ -34,11 +34,7 @@ contract LibParseOperandHandleOperand8M1M1Test is Test { uint256[] memory values = new uint256[](1); values[0] = value; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperand8M1M1(values); } @@ -68,11 +64,7 @@ contract LibParseOperandHandleOperand8M1M1Test is Test { uint256[] memory values = new uint256[](2); values[0] = a; values[1] = b; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperand8M1M1(values); } @@ -106,11 +98,7 @@ contract LibParseOperandHandleOperand8M1M1Test is Test { values[0] = a; values[1] = b; values[2] = c; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperand8M1M1(values); } diff --git a/test/src/lib/parse/LibParseOperand.handleOperandDoublePerByteNoDefault.t.sol b/test/src/lib/parse/LibParseOperand.handleOperandDoublePerByteNoDefault.t.sol index 9b0864b00..92c3266b6 100644 --- a/test/src/lib/parse/LibParseOperand.handleOperandDoublePerByteNoDefault.t.sol +++ b/test/src/lib/parse/LibParseOperand.handleOperandDoublePerByteNoDefault.t.sol @@ -45,11 +45,7 @@ contract LibParseOperandHandleOperandDoublePerByteNoDefaultTest is Test { values[0] = a; values[1] = b; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandDoublePerByteNoDefault(values); } @@ -67,11 +63,7 @@ contract LibParseOperandHandleOperandDoublePerByteNoDefaultTest is Test { uint256[] memory values = new uint256[](2); values[0] = a; values[1] = b; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandDoublePerByteNoDefault(values); } diff --git a/test/src/lib/parse/LibParseOperand.handleOperandM1M1.t.sol b/test/src/lib/parse/LibParseOperand.handleOperandM1M1.t.sol index 8492c6860..fe44ca755 100644 --- a/test/src/lib/parse/LibParseOperand.handleOperandM1M1.t.sol +++ b/test/src/lib/parse/LibParseOperand.handleOperandM1M1.t.sol @@ -34,11 +34,7 @@ contract LibParseOperandHandleOperandM1M1Test is Test { uint256[] memory values = new uint256[](1); values[0] = value; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandM1M1(values); } @@ -67,11 +63,7 @@ contract LibParseOperandHandleOperandM1M1Test is Test { uint256[] memory values = new uint256[](2); values[0] = a; values[1] = b; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandM1M1(values); } diff --git a/test/src/lib/parse/LibParseOperand.handleOperandSingleFull.t.sol b/test/src/lib/parse/LibParseOperand.handleOperandSingleFull.t.sol index 23137aa8b..614c26a8b 100644 --- a/test/src/lib/parse/LibParseOperand.handleOperandSingleFull.t.sol +++ b/test/src/lib/parse/LibParseOperand.handleOperandSingleFull.t.sol @@ -28,11 +28,7 @@ contract LibParseOperandHandleOperandSingleFullTest is Test { value *= 1e18; uint256[] memory values = new uint256[](1); values[0] = value; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandSingleFull(values); } diff --git a/test/src/lib/parse/LibParseOperand.handleOperandSingleFullNoDefault.t.sol b/test/src/lib/parse/LibParseOperand.handleOperandSingleFullNoDefault.t.sol index a89ecbee3..f21679ec7 100644 --- a/test/src/lib/parse/LibParseOperand.handleOperandSingleFullNoDefault.t.sol +++ b/test/src/lib/parse/LibParseOperand.handleOperandSingleFullNoDefault.t.sol @@ -35,11 +35,7 @@ contract LibParseOperandHandleOperandSingleFullTest is Test { uint256[] memory values = new uint256[](1); values[0] = value; - vm.expectRevert( - abi.encodeWithSelector( - OperandOverflow.selector - ) - ); + vm.expectRevert(abi.encodeWithSelector(OperandOverflow.selector)); LibParseOperand.handleOperandSingleFullNoDefault(values); }