testtools

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TestDataDir = filepath.Join(filepath.Dir(callerPath), "../testdata")
)

Functions

func AssertStreamerHasCorrectReturnBehaviour

func AssertStreamerHasCorrectReturnBehaviour(t *testing.T, s beep.Streamer, expectedSamples int)

AssertStreamerHasCorrectReturnBehaviour tests whether the return values returned by the streamer s adhere to the description on the Streamer interface.

func Collect

func Collect(s beep.Streamer) [][2]float64

Collect drains Streamer s and returns all the samples it streamed.

func CollectNum

func CollectNum(num int, s beep.Streamer) [][2]float64

CollectNum collects num samples from the streamer in chunks and returns them all.

func RandomDataStreamer

func RandomDataStreamer(numSamples int) (s beep.StreamSeeker, data [][2]float64)

RandomDataStreamer generates numSamples random samples and returns a StreamSeeker to stream them.

func TestFilePath

func TestFilePath(path string) string

Types

type ErrorStreamer

type ErrorStreamer struct {
	Error error
}

func (ErrorStreamer) Err

func (e ErrorStreamer) Err() error

func (ErrorStreamer) Stream

func (e ErrorStreamer) Stream(samples [][2]float64) (n int, ok bool)

Jump to

Keyboard shortcuts

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