Help us shape the future of Go! Take the 2026 Go Developer Survey

mockt

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

mockt implements a system for mocking testing.T.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *t

New creates a new T that does not actually run any tests or exist as part of a test.

Types

type T

type T interface {
	// Fail marks the test as failed, see [testing.T.Fail].
	Fail()

	// Failed returns if the test has failed or not, see
	// [testing.T.Failed].
	Failed() bool

	// Fatal is a wrapper around [testing.T.Fatal].
	Fatal(args ...interface{})

	// Cleanup is a wrapper around [testing.T.Cleanup].
	Cleanup(func())
}

Jump to

Keyboard shortcuts

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