An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 9.0% on proxy.golang.org

proxy.golang.org : github.com/cespare/a

Package a provides some simple assertions for tests using package testing. Assertions are used in tests like this: where t is a *testing.T (or a *testing.B). Check may be substituted for Assert if the test should continue on failure. An error message about expected vs. got will be automatically generated, but a custom error message may be provided instead: A Checker function is always the third argument to Check or Assert; the value under test is always the second. Subsequent arguments to the checker (if any) are in the fourth and later positions. The last argument is always the optional error message. A custom checker may be created by simply making a CheckerFunc (or a function with the same signature). The checker is called by passing in the Assert/Check arguments, starting with the value under test, then any further arguments, and finally the message if provided. The checker returns a boolean indicating success/failure and an error message to display. For example, in this statement: the Equals checker is called like this: Most checkers do not have specific documentation because their names fully describe their behavior.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/cespare/a
License: MIT
Latest release: almost 9 years ago
First release: almost 9 years ago
Namespace: github.com/cespare
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 1 month ago