testutil

package
v0.0.0-...-07a5409 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Must

func Must[T any](val T, err error) func(*testing.T) T

Must takes return values from a function and returns the non-error one. If the error value is non-nil then it fails the test

func Must2

func Must2[T, U any](val1 T, val2 U, err error) func(*testing.T) (T, U)

Must2 takes return values from a 3 return function and returns the non-error ones. If the error value is non-nil then it fails the test.

func RandomBytes

func RandomBytes(size int) []byte

func RandomCID

func RandomCID() datamodel.Link

func RandomMultihash

func RandomMultihash() mh.Multihash

func RandomMultihashes

func RandomMultihashes(count int) []mh.Multihash

Types

This section is empty.

Jump to

Keyboard shortcuts

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