MCPcopy Create free account
hub / github.com/cockroachdb/errors / TestWrappedDomain

Function TestWrappedDomain

domains/domains_test.go:59–68  ·  view source on GitHub ↗

This test demonstrates that the domain information is visible "through" layers of wrapping.

(t *testing.T)

Source from the content-addressed store, hash-verified

57// This test demonstrates that the domain information is visible
58// "through" layers of wrapping.
59func TestWrappedDomain(t *testing.T) {
60 myDomain := domains.NamedDomain("here")
61 err := errors.New("hello")
62 err = domains.WithDomain(err, myDomain)
63 err = errors.Wrap(err, "world")
64
65 tt := testutils.T{T: t}
66
67 tt.Check(!domains.NotInDomain(err, myDomain))
68}
69
70// This test demonstrates how it is possible to leave the domain
71// implicit, in which case a domain is computed automatically based on

Callers

nothing calls this directly

Calls 4

CheckMethod · 0.95
NamedDomainFunction · 0.92
WithDomainFunction · 0.92
NotInDomainFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…