A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pkg.go.dev/github.com/terramate-io/terramate@v0.14.4/test/errors below:

errors package - github.com/terramate-io/terramate/test/errors - Go Packages

Package errors provides useful assert functions for handling errors on tests

This section is empty.

This section is empty.

func Assert(t *testing.T, err, target error, args ...interface{})

Assert err is (contains, wraps, etc) target.

AssertAsErrorsList will check if the given error can be handled as an *errors.List by calling errors.As. It fails if the error fails to be an *errors.List.

AssertErrorList will check that the given err is an *errors.List and that all given errors on targets are contained on it using errors.Is.

AssertIsErrors will check that all target errors are contained within the given err. Usually err underlying implementation is an errors.List, but that is not enforced, it is enough that for all the target errors errors.Is returns true, so this function also works for long chains of errors.

AssertIsKind asserts err is of kind k.

AssertKind asserts that got is of same error kind as want.

This section is empty.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4