test

package
v0.158.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Report

func Report(w io.Writer, rs Results) error

Report prints the results of the testing to the IO writer.

Types

type Result

type Result struct {
	// contains filtered or unexported fields
}

Result describes the outcome of a particular test case.

type Results

type Results struct {
	// contains filtered or unexported fields
}

Results is a collection of test results from a test suite.

func Test

func Test(ctx context.Context, w io.Writer, path string) (Results, error)

Test runs all tests in the subtree of path and returns the results.

func (*Results) Add

func (rs *Results) Add(r Result)

Add adds a result to the set of results.

func (Results) AllPassed

func (rs Results) AllPassed() bool

AllPassed returns true if all results were successful.

func (Results) Count

func (rs Results) Count() int

Count returns the number of results in the set.

func (Results) CountFailed

func (rs Results) CountFailed() int

CountFailed returns the number of tests that failed.

func (Results) CountPassed

func (rs Results) CountPassed() int

CountPassed returns the number of tests that passed.

Jump to

Keyboard shortcuts

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