Ecosyste.ms: Packages

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 : 4d63.com/test

Package test is a package that provides equality functions for testing Go code. It is focused on making the most common action in test code simple, testing equality expectations. A simple test function looks like this: If the check passes, the verbose output looks like this: If the check fails, and the type is a bool, int, or float, the output looks like this: If the check fails, and the type is a string, the output looks like this: If the check fails, and the type is an array or slice, the output looks like this: If the check fails, and the type is a struct value, the output looks like this: The terms got and want are used to describe what you got as a result of running the code, and what you want to have gotten. These terms are commonly found in the Go stdlib and it's own testing docs. In some other testing libraries they are sometimes referred to actual and expected. Checks can be nested using the bool return value of a prior check. Checks can cause a test to stop at a failure using the bool return value. Comparison of values is performed using Google's cmp Go module: https://github.com/google/go-cmp/cmp

Registry - Source - Documentation - JSON
purl: pkg:golang/4d63.com/test
License: MIT
Latest release: almost 3 years ago
First release: almost 3 years ago
Namespace: 4d63.com
Stars: 0 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 23 days ago

    Loading...
    Readme
    Loading...