parser

package
v0.0.0-...-9a276f2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2018 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	Name        string
	Time        int
	Tests       []*Test
	CoveragePct string
}

Package contains the test results of a single package.

type Report

type Report struct {
	Packages []Package
}

Report is a collection of package tests.

func Parse

func Parse(r io.Reader, pkgName string) (*Report, error)

Parse parses go test output from reader r and returns a report with the results. An optional pkgName can be given, which is used in case a package result line is missing.

func (*Report) Failures

func (r *Report) Failures() int

Failures counts the number of failed tests in this report

type Result

type Result int

Result represents a test result.

const (
	PASS Result = iota
	FAIL
	SKIP
	RACE
)

Test result constants

type Test

type Test struct {
	Name   string
	Time   int
	Result Result
	Output []string
}

Test contains the results of a single test.

Jump to

Keyboard shortcuts

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