test

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2018 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionBenchmark

func ConnectionBenchmark(b *testing.B, options *Options)

ConnectionBenchmark runs a connection benchmark.

func ConnectionTest

func ConnectionTest(t *testing.T, options *Options)

ConnectionTest runs a connection test.

func MulticastTest

func MulticastTest(t *testing.T, options *Options)

MulticastTest runs a multicast test suite with the provided options.

func ReadBlock

func ReadBlock(r io.Reader) ([]byte, error)

ReadBlock reads a data block from the provided reader and returns it.

func RequireReadBlock

func RequireReadBlock(tb testing.TB, r io.Reader) []byte

RequireReadBlock runs ReadBlock and fails the provided test/brenchmark in case of an error.

func RequireWriteBlock

func RequireWriteBlock(tb testing.TB, w io.Writer, data []byte)

RequireWriteBlock runs WriteBlock and fails the provided test/brenchmark in case of an error.

func WriteBlock

func WriteBlock(w io.Writer, data []byte) error

WriteBlock writes the provided data to the provided writer.

Types

type Options

type Options struct {
	ListenNetwork            string
	ListenAddress            string
	ListenOptions            []value.Option
	DialNetwork              string
	DialOptions              []value.Option
	MulticastNetwork         string
	MulticastRequestAddress  string
	MulticastResponseAddress string
	MulticastOptions         []value.Option
}

Options holds the test options.

func (*Options) Clone

func (o *Options) Clone() *Options

Clone returns a clone of the Options struct.

Jump to

Keyboard shortcuts

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