table

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestID

type TestID struct {
	Name string
	// contains filtered or unexported fields
}

TestID identifies a test case in a table test by name and file:line position in the source file. See ID for usage.

func ID

func ID(name string) TestID

ID creates a TestID from the name and position of the caller in the source file. ID is used to improve the navigation of large table tests by adding a file:line message to the output of a test. This output becomes a hyperlink in most IDE.

type testCase struct {
	id table.TestID
	...
}

for _, tc := range []testCase{...} {
	t.Run(tc.id.Name, func(t *testing.T) {
		tc.id.PrintPosition()
		...
	})
}

func (TestID) PrintPosition

func (i TestID) PrintPosition()

Jump to

Keyboard shortcuts

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