reflection

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddOnPanicExitHandler added in v0.1.13

func AddOnPanicExitHandler(fn func(interface{}))

Adds a global panic handler before process kill (this handler will be executed if not recover is set before the process exits)

func AddPanicHandler added in v0.1.13

func AddPanicHandler(fn func(interface{}))

Adds a global panic handler (this handler will be executed before any recover call)

func AddToHelpersMap added in v0.1.14

func AddToHelpersMap(t *testing.T, frameFnNames []string)

func GetBenchmarkHasSub added in v0.1.13

func GetBenchmarkHasSub(b *testing.B) int32

func GetBenchmarkMutex added in v0.1.13

func GetBenchmarkMutex(b *testing.B) *sync.RWMutex

func GetBenchmarkResult added in v0.1.13

func GetBenchmarkResult(b *testing.B) (*testing.BenchmarkResult, error)

Get benchmark result from the private result field in testing.B

func GetBenchmarkSuiteName added in v0.1.13

func GetBenchmarkSuiteName(b *testing.B) string

func GetFieldPointerOf added in v0.1.12

func GetFieldPointerOf(i interface{}, fieldName string) (unsafe.Pointer, error)

Gets a pointer of a private or public field in any struct

func GetIsParallel added in v0.1.12

func GetIsParallel(t *testing.T) bool

func GetParentBenchmark added in v0.1.13

func GetParentBenchmark(b *testing.B) *testing.B

func GetTestDuration added in v0.2.0

func GetTestDuration(t *testing.T) (time.Duration, error)

func GetTestMutex added in v0.1.12

func GetTestMutex(t *testing.T) *sync.RWMutex

func GetTestStartTime added in v0.2.0

func GetTestStartTime(t *testing.T) (time.Time, error)

func GetTypePointer added in v0.1.12

func GetTypePointer(i interface{}, fieldName string) (reflect.Type, error)

Gets the type pointer to a field name

func SkipAndFinishTest added in v0.3.0

func SkipAndFinishTest(t *testing.T)

Mark the current test as skipped and finished without exit the current goroutine

Types

This section is empty.

Jump to

Keyboard shortcuts

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