internal

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCanNotRunIfNotBuiltinTesting = "This test is only supported on types of *testing.T"
)

Variables

View Source
var Highlight = pterm.NewStyle(pterm.FgLightRed).Sprint

Functions

func Fail

func Fail(t testingT, message string, objects Objects, args ...interface{})

func FailS

func FailS(message string, objects Objects, args ...interface{}) string

func GetCurrentScriptDirectory added in v0.2.2

func GetCurrentScriptDirectory() string

GetCurrentScriptDirectory returns the directory of the current Go file.

func GetDifference

func GetDifference(a, b interface{}, raw ...bool) string

GetDifference returns the diff for two projects.

func GetTest

func GetTest(t testingT) *testing.T

GetTest converts to *testing.T.

func ModifyWrappedText

func ModifyWrappedText(text, wrappingString string, modifier func(wrappedText string) string) string

Types

type Object

type Object struct {
	Name      string
	NameStyle *pterm.Style
	Data      interface{}
	DataStyle *pterm.Style
	Raw       bool
}

type Objects

type Objects []Object

func NewObjectsExpectedActual

func NewObjectsExpectedActual(expected, actual interface{}) Objects

func NewObjectsSingleNamed

func NewObjectsSingleNamed(name string, obj interface{}) Objects

func NewObjectsSingleUnknown

func NewObjectsSingleUnknown(obj interface{}) Objects

func NewObjectsUnknown

func NewObjectsUnknown(objs ...interface{}) Objects

Jump to

Keyboard shortcuts

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