Skip to content

Commit

Permalink
remove size restrictions on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martyall committed Sep 13, 2023
1 parent 55fc8f0 commit 6259ab3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Network/Ethereum/Web3/Solidity/AbiEncoding.purs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ parseBytes n = do
let
{ after, before } = splitAtByteOffset n input

position' = Position $ position { column = position.column + 1 }
position' = Position $ position { column = position.column + n }

let newState = ParseState after position' true
stateParserT $ const (Tuple before newState)
15 changes: 6 additions & 9 deletions test/web3/Web3Spec/Encoding/ContainersSpec.purs
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ import Data.Maybe (fromJust)
import Data.NonEmpty (NonEmpty(..))
import Data.String (CodePoint, fromCodePointArray)
import Data.Tuple (Tuple(..))
import Debug (spy)
import Effect.Aff (Aff)
import Effect.Class (liftEffect)
import Network.Ethereum.Core.BigNumber (BigNumber(..))
import Network.Ethereum.Core.HexString (HexString, toByteString)
import Network.Ethereum.Web3.Solidity (Address, BytesN, IntN, Tuple1(..), Tuple2(..), Tuple4(..), Tuple9(..), UIntN, Vector, fromByteString, intNFromBigNumber, nilVector, uIntNFromBigNumber, (:<))
import Network.Ethereum.Core.HexString (toByteString)
import Network.Ethereum.Web3.Solidity (BytesN, IntN, Tuple1(..), Tuple2(..), Tuple4(..), Tuple9(..), UIntN, fromByteString, intNFromBigNumber, nilVector, uIntNFromBigNumber, (:<))
import Network.Ethereum.Web3.Solidity.AbiEncoding (class ABIEncode, class ABIDecode, toDataBuilder, fromData)
import Network.Ethereum.Web3.Solidity.Generic (genericFromData, genericABIEncode, class GenericABIDecode, class GenericABIEncode)
import Network.Ethereum.Web3.Solidity.Sizes (s1, s16, s2, s224, s256, s4)
import Network.Ethereum.Web3.Solidity.Vector (Vector, toVector)
import Network.Ethereum.Web3.Types (Address, HexString, embed, mkAddress, mkHexString, unHex)
import Network.Ethereum.Web3.Types (Address, HexString, embed, mkAddress, mkHexString)
import Parsing (ParseError)
import Partial.Unsafe (unsafePartial)
import Test.QuickCheck (class Arbitrary, arbitrary, quickCheck, quickCheck', (<?>), (===))
import Test.QuickCheck.Gen (arrayOf, vectorOf)
import Test.QuickCheck (class Arbitrary, arbitrary, quickCheck, (===))
import Test.QuickCheck.Gen (arrayOf)
import Test.Spec (Spec, describe, it)
import Test.Spec.Assertions (shouldEqual)

Expand Down Expand Up @@ -470,8 +468,7 @@ data UnicodeChar = Normal CodePoint | Surrogates CodePoint CodePoint

instance Arbitrary BMPString where
arbitrary = BMPString <$> do
n <- chooseInt 0 10
ucs <- vectorOf n arbitrary
ucs <- arrayOf arbitrary
pure $ fromCodePointArray $ foldMap f ucs
where
f uc = case uc of
Expand Down

0 comments on commit 6259ab3

Please sign in to comment.