tracetest

package
v2.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCompose

func TestCompose(t *testing.T, compose, x interface{})

TestCompose is a generic function for testing trace composing. It calls given compose function with two instances of type of x and inspects result.

In a nutshell, it uses reflection. It creates two instances of x's type, say x' and x", fills each functional field of instances with stub function and then calls compose(x', x"). It then calls each functional field of composed struct – if some fields are not called in x' or x" then it fails the test.

func TestSingleTrace

func TestSingleTrace(t *testing.T, x interface{}, traceName string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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