changetest

package
v0.0.0-...-c9cfaf6 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package changetest provides utilities for change detection testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filename

func Filename(id trace.ID) string

Filename returns a recommended test case filename for the given trace ID.

func PlotSeries

func PlotSeries(filename, title string, s trace.Series) error

PlotSeries generates a plot for debugging purposes.

func WriteCaseFile

func WriteCaseFile(filename string, c *Case) error

WriteCaseFile writes the test case c to filename.

func WriteNewCaseFile

func WriteNewCaseFile(filename string, series trace.Series) error

WriteNewCaseFile writes a new test case with the "expect" field empty.

Types

type Case

type Case struct {
	Expect []int        `json:"expect"`
	Series trace.Series `json:"series"`
}

Case is a change detection test case.

func ReadCaseFile

func ReadCaseFile(filename string) (*Case, error)

ReadCaseFile reads a test case from filename.

Jump to

Keyboard shortcuts

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