testutil

package
v1.14.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActorAddressProvider

func ActorAddressProvider(size int) func(*testing.T) address.Address

func AddressProvider

func AddressProvider() func(*testing.T) address.Address

func BigProvider

func BigProvider() func(*testing.T) big.Int

func BlsAddressProvider

func BlsAddressProvider() func(*testing.T) address.Address

func BytesAtMostProvider

func BytesAtMostProvider(size int) func(*testing.T) []byte

func BytesFixedProvider

func BytesFixedProvider(size int) func(*testing.T) []byte

func CborErBasicTest

func CborErBasicTest(t *testing.T, src, dst cbor.Er, opts CborErBasicTestOptions)

func CidProvider

func CidProvider(size int) func(*testing.T) cid.Cid

func CryptoSigTypeProvider

func CryptoSigTypeProvider() func(*testing.T) crypto.SigType

func DelegatedAddressProvider added in v1.10.0

func DelegatedAddressProvider(size int) func(*testing.T) address.Address

func IDAddressProvider

func IDAddressProvider() func(*testing.T) address.Address

func IntProvider

func IntProvider(t *testing.T) int

func IntRangedProvider

func IntRangedProvider(min, max int) func(*testing.T) int

func MustRegisterDefaultValueProvier

func MustRegisterDefaultValueProvier(fn interface{})

func NegativeBigProvider

func NegativeBigProvider() func(*testing.T) big.Int

func PaddedSizeFixedProvider

func PaddedSizeFixedProvider(fixed abi.PaddedPieceSize) func(*testing.T) abi.PaddedPieceSize

func PaddedSizeProvider

func PaddedSizeProvider() func(*testing.T) abi.PaddedPieceSize

func PositiveBigProvider

func PositiveBigProvider() func(*testing.T) big.Int

func Provide

func Provide(t *testing.T, dst interface{}, options ...interface{})

func RegisterDefaultValueProvier

func RegisterDefaultValueProvier(fn interface{}) error

func SecpAddressProvider

func SecpAddressProvider(size int) func(*testing.T) address.Address

func StringInnerAtMostProvider

func StringInnerAtMostProvider(size int) func(*testing.T) string

func StringInnerFixedProvider

func StringInnerFixedProvider(size int) func(*testing.T) string

func UnpaddedSizeProvider

func UnpaddedSizeProvider() func(*testing.T) abi.UnpaddedPieceSize

func ValueSetNReset

func ValueSetNReset(t *testing.T, name string, onSet func(), onReset func(), vsets ...interface{})

Types

type CborErBasicTestOptions

type CborErBasicTestOptions struct {
	Buf         *bytes.Buffer
	Prepare     func()
	ProvideOpts []interface{}
	Provided    func()
	Marshaled   func(data []byte)
	Finished    func()
}

type OptionFunc

type OptionFunc func(*testing.T, *valueProviderRegistry)

func WithSliceLen

func WithSliceLen(size int) OptionFunc

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL