modulepackage
0.0.0-20211026125417-57bd13f7b5f0
Repository: https://github.com/pingcap/check.git
Documentation: pkg.go.dev
# README
Instructions
Install the package with:
go get github.com/pingcap/check
Import it with:
import "github.com/pingcap/check"
and use check as the package name inside the code.
# Functions
Commentf returns an infomational value to use with Assert or Check calls.
List returns the names of the test functions in the given suite that will be run with the provided run configuration.
ListAll returns the names of all the test functions registered with the Suite function that will be run with the provided run configuration.
The Not checker inverts the logic of the provided checker.
Run runs the provided test suite using the provided run configuration.
RunAll runs all test suites registered with the Suite function, using the provided run configuration.
SerialSuites registers the given value as a test suite to be run serially.
Suite registers the given value as a test suite to be run.
TestingT runs all test suites registered with the Suite function, printing results to stdout, and reporting any failures back to the "testing" package.
# Variables
BytesEquals checker compares two bytes sequence using bytes.Equal.
No description provided by the author
No description provided by the author
The DeepEquals checker verifies that the obtained value is deep-equal to the expected value.
The EqualsIn checker verifies that the obtained value is equal to one of the expected values, according to usual Go semantics for ==.
The Equals checker verifies that the obtained value is equal to the expected value, according to usual Go semantics for ==.
The EqualsIn checker verifies that the obtained value is equal to one of the expected values, according to usual Go semantics for ==.
The ErrorMatches checker verifies that the error value is non nil and matches the regular expression provided.
The FitsTypeOf checker verifies that the obtained value is assignable to a variable with the same type as the provided sample value.
No description provided by the author
No description provided by the author
The HasKey checker verifies that the obtained map contains the given key.
The HasLen checker verifies that the obtained value has the provided length.
The Implements checker verifies that the obtained value implements the interface specified via a pointer to an interface variable.
The IsFalse checker verifies that the obtained value is false.
The IsNil checker tests whether the obtained value is nil.
The IsTrue checker verifies that the obtained value is true.
No description provided by the author
No description provided by the author
The Matches checker verifies that the string provided as the obtained value (or the string resulting from obtained.String()) matches the regular expression provided.
The NotNil checker verifies that the obtained value is not nil.
The PanicMatches checker verifies that calling the provided zero-argument function will cause a panic with an error value matching the regular expression provided.
The Panics checker verifies that calling the provided zero-argument function will cause a panic which is deep-equal to the provided value.
# Structs
No description provided by the author
See the Checker interface.
No description provided by the author
No description provided by the author
# Interfaces
The Checker interface must be provided by checkers used with the Assert and Check verification methods.
CommentInterface must be implemented by types that attach extra information to failed checks.