test

package
v0.0.0-...-ea27d6f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package test contains utilities used by plz_go_test.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PleaseGoTest

func PleaseGoTest(goTool, dir, testPackage, output string, sources, exclude []string, isBenchmark, external bool)

PleaseGoTest will generate the test main for the provided sources

func WriteTestMain

func WriteTestMain(testPackage string, sources []string, output string, coverage bool, coverVars []CoverVar, benchmark, hasFuzz, coverageRedesign bool) error

WriteTestMain templates a test main file from the given sources to the given output file.

Types

type CoverVar

type CoverVar struct {
	Dir, ImportPath, ImportName, Var, File string
}

A CoverVar is just a combination of package path and variable name for one of the templated-in coverage variables.

func FindCoverVars

func FindCoverVars(dir, testPackage string, external bool, excludedDirs []string) ([]CoverVar, error)

FindCoverVars searches the given directory recursively to find all Go files with coverage variables.

Jump to

Keyboard shortcuts

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