process

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: Apache-2.0 Imports: 7 Imported by: 32

Documentation

Overview

Package process is a thin wrapper around the gotests library. It is intended to be called from a binary and handle its arguments, flags, and output when generating tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(out io.Writer, args []string, opts *Options)

Generates tests for the Go files defined in args with the given options. Logs information and errors to out. By default outputs generated tests to out unless specified by opt.

Types

type Options

type Options struct {
	OnlyFuncs          string   // Regexp string for filter matches.
	ExclFuncs          string   // Regexp string for excluding matches.
	ExportedFuncs      bool     // Only include exported functions.
	AllFuncs           bool     // Include all non-tested functions.
	PrintInputs        bool     // Print function parameters as part of error messages.
	Subtests           bool     // Print tests using Go 1.7 subtests
	Parallel           bool     // Print tests that runs the subtests in parallel.
	WriteOutput        bool     // Write output to test file(s).
	Template           string   // Name of custom template set
	TemplateDir        string   // Path to custom template set
	TemplateParamsPath string   // Path to custom parameters json file(s).
	TemplateData       [][]byte // Data slice for templates
}

Set of options to use when generating tests.

Jump to

Keyboard shortcuts

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