MCPcopy Index your code
hub / github.com/cockroachdb/errors / TestJoin

Function TestJoin

errutil_api_test.go:24–31  ·  view source on GitHub ↗

More detailed testing of Join is in datadriven_test.go. Here we make sure that the public API includes the stacktrace wrapper.

(t *testing.T)

Source from the content-addressed store, hash-verified

22// More detailed testing of Join is in datadriven_test.go. Here we make
23// sure that the public API includes the stacktrace wrapper.
24func TestJoin(t *testing.T) {
25 e := errors.Join(errors.New("abc123"), errors.New("def456"))
26 printed := fmt.Sprintf("%+v", e)
27 expected := `Error types: (1) *withstack.withStack (2) *join.joinError (3) *withstack.withStack (4) *errutil.leafError (5) *withstack.withStack (6) *errutil.leafError`
28 if !strings.Contains(printed, expected) {
29 t.Errorf("Expected: %s to contain: %s", printed, expected)
30 }
31}

Callers

nothing calls this directly

Calls 2

JoinFunction · 0.92
NewFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…