gotest

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int

see https://pkg.go.dev/cmd/test2json#hdr-Output_Format

const (
	Start     Action = 0
	Pass      Action = 1
	Fail      Action = 2
	Skip      Action = 3
	Out       Action = 4
	Run       Action = 5
	Undefined Action = -1
)

func ToAction added in v0.0.4

func ToAction(s string) Action

func (Action) IsFinal added in v0.0.4

func (a Action) IsFinal() bool

func (Action) MarshalJSON added in v0.0.6

func (a Action) MarshalJSON() ([]byte, error)

func (Action) String

func (a Action) String() string

func (*Action) UnmarshalJSON added in v0.0.6

func (a *Action) UnmarshalJSON(b []byte) error

type Event added in v0.0.4

type Event struct {
	Time    time.Time `json:"Time"`
	Action  Action    `json:"Action"`
	Output  string    `json:"Output"`
	Test    string    `json:"Test"`
	Package string    `json:"Package"`
	Elapsed float64   `json:"Elapsed"` // Elapsed is the number of seconds that have passed.
}

func (*Event) PackageEvent added in v0.0.6

func (e *Event) PackageEvent() bool

PackageEvent returns true if the event is a package event (no test referenced in event).

func (*Event) Seed added in v0.0.6

func (e *Event) Seed() (int64, bool)

type PackageEvents added in v0.0.6

type PackageEvents struct {
	Package    string
	Start, End *Event
	Seed       int64
	Events     []Event
}

func ByPackage added in v0.0.6

func ByPackage(events []Event) []*PackageEvents

func ReadByPackage added in v1.1.0

func ReadByPackage(r io.Reader) ([]*PackageEvents, error)

func (*PackageEvents) Add added in v0.0.6

func (pe *PackageEvents) Add(e Event)

Jump to

Keyboard shortcuts

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