Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertNoError ¶
AssertNoError is like assert.NoError, but properly formats attached error stack traces.
func RequireNoError ¶
RequireNoError is like require.NoError, but properly formats attached error stack traces.
Types ¶
type AfterSuite ¶
AfterSuite represents a method invoked after completing a test suite.
type BeforeSuite ¶
BeforeSuite describes a method invoked before starting a test suite.
type BeforeTest ¶
BeforeTest represents a method invoked before each test method in a suite.
type OutputCapture ¶
type OutputCapture struct {
// contains filtered or unexported fields
}
OutputCapture can be used to capture standard output and standard error.
func CaptureOutput ¶
func CaptureOutput() *OutputCapture
CaptureOutput captures the output in tests. Always defer OutputCapture.Close() right after CaptureOutput is called.
func (*OutputCapture) Close ¶
func (c *OutputCapture) Close()
Close finalizes the capture by flushing/caching all buffers and restoring the original stdout/sterr.
func (*OutputCapture) GetErr ¶
func (c *OutputCapture) GetErr() []byte
GetErr calls Close and returns the captured standard error.
func (*OutputCapture) GetErrString ¶
func (c *OutputCapture) GetErrString() string
GetErrString calls Close and returns the captured standard error as string.
func (*OutputCapture) GetOut ¶
func (c *OutputCapture) GetOut() []byte
GetOut calls Close and returns the captured standard output.
func (*OutputCapture) GetOutString ¶
func (c *OutputCapture) GetOutString() string
GetOutString calls Close and returns the captured standard output as string.
type Suite ¶
type Suite interface {
IsSuite()
}
Suite describes a struct that can be used as test suite.
type TestingT ¶
type TestingT interface { Cleanup(f func()) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fail() FailNow() Failed() bool Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Helper() Log(args ...interface{}) Logf(format string, args ...interface{}) Name() string Run(name string, f func(t *testing.T)) bool Skip(args ...interface{}) SkipNow() Skipf(format string, args ...interface{}) Skipped() bool TempDir() string }
TestingT covers most of the *testing.T methods.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
fixturesmocks
Package fixturesmocks is a generated GoMock package.
|
Package fixturesmocks is a generated GoMock package. |