gotest

package
v3.9.0-alpha.0+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractDuration

func ExtractDuration(line string) (string, bool)

ExtractDuration extracts the package duration from a test output line

func ExtractOutput

func ExtractOutput(line string) (string, int, bool)

ExtractOutput captures a line of output indented by whitespace and returns the output, the indentation depth (4 spaces is the canonical indentation used by go test), and whether the match was successful.

func ExtractPackage

func ExtractPackage(line string) (name string, duration string, coverage string, ok bool)

ExtractPackage extracts the name of the test suite from a test package line.

func ExtractProperties

func ExtractProperties(line string) (map[string]string, bool)

ExtractProperties extracts any metadata properties of the test suite from a test output line

func ExtractResult

func ExtractResult(line string) (r api.TestResult, name string, depth int, duration string, ok bool)

ExtractResult extracts the test result from a test output line. Depth is measured as the leading whitespace for the line multiplied by four, which is used to identify output from nested Go subtests.

func ExtractRun

func ExtractRun(line string) (string, bool)

ExtractRun identifies the start of a test output section.

func NewParser

func NewParser(builder builder.TestSuitesBuilder, stream bool) parser.TestOutputParser

NewParser returns a new parser that's capable of parsing Go unit test output

Types

This section is empty.

Jump to

Keyboard shortcuts

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