import "github.com/ethereum/go-ethereum/internal/utesting"
Package utesting provides a standalone replacement for package testing.
This package exists because package testing cannot easily be embedded into a standalone go program. It provides an API that mirrors the standard library testing API.
CountFailures returns the number of failed tests in the result slice.
Run executes a single test.
Result is the result of a test execution.
RunTAP runs the given tests and writes Test Anything Protocol output to the report writer.
RunTests executes all given tests in order and returns their results. If the report writer is non-nil, a test report is written to it in real time.
type T struct {
// contains filtered or unexported fields
}
T is the value given to the test function. The test can signal failures and log output by calling methods on this object.
Error is equivalent to Log followed by Fail.
Errorf is equivalent to Logf followed by Fail.
Fail marks the test as having failed but continues execution.
FailNow marks the test as having failed and stops its execution by calling runtime.Goexit (which then runs all deferred calls in the current goroutine).
Failed reports whether the test has failed.
Fatal is equivalent to Log followed by FailNow.
Fatalf is equivalent to Logf followed by FailNow.
Helper exists for compatibility with testing.T.
Log formats its arguments using default formatting, analogous to Println, and records the text in the error log.
Logf formats its arguments according to the format, analogous to Printf, and records the text in the error log. A final newline is added if not provided.
Test represents a single test.
MatchTests returns the tests whose name matches a regular expression.
Package utesting imports 8 packages (graph) and is imported by 4 packages. Updated 2020-11-04. Refresh now. Tools for package owners.