testutil

package
v0.0.0-...-43c8ab9 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

README

Package cloudeng.io/go/cmd/goannotate/annotators/internal/testutil

CircleCI Go Report Card

import cloudeng.io/go/cmd/goannotate/annotators/internal/testutil

Functions

Func CompareDiffReports
func CompareDiffReports(t *testing.T, a, b []DiffReport)
Func DiffOneFile
func DiffOneFile(t *testing.T, a, b string) string
Func LocatePackages
func LocatePackages(ctx context.Context, t *testing.T, pkgs ...string) *locate.T

LocatePackages runs a locator.T with pkgs as the argument to .AddFunctions and .AddPackages.

Func SetupAnnotators
func SetupAnnotators(t *testing.T) (string, func())

SetupAnnotators reads ./testdata/config.yaml and initializes the annototators package, creates a temp directory and a cleanup function to remove the test directory on test failures.

Func SetupFunctions
func SetupFunctions(t *testing.T)

SetupFunctions reads ./testdata/config.yaml and initializes the annotators/functions package.

Types

Type DiffReport
type DiffReport struct {
	Name string
	Diff string
}
Functions
func DiffMultipleFiles(t *testing.T, a, b []string) []DiffReport

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareDiffReports

func CompareDiffReports(t *testing.T, a, b []DiffReport)

func DiffOneFile

func DiffOneFile(t *testing.T, a, b string) string

func LocatePackages

func LocatePackages(ctx context.Context, t *testing.T, pkgs ...string) *locate.T

LocatePackages runs a locator.T with pkgs as the argument to .AddFunctions and .AddPackages.

func SetupAnnotators

func SetupAnnotators(t *testing.T) (string, func())

SetupAnnotators reads ./testdata/config.yaml and initializes the annototators package, creates a temp directory and a cleanup function to remove the test directory on test failures.

func SetupFunctions

func SetupFunctions(t *testing.T)

SetupFunctions reads ./testdata/config.yaml and initializes the annotators/functions package.

Types

type DiffReport

type DiffReport struct {
	Name string
	Diff string
}

func DiffMultipleFiles

func DiffMultipleFiles(t *testing.T, a, b []string) []DiffReport

Jump to

Keyboard shortcuts

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