MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestError_ErrorString

Function TestError_ErrorString

internal/upstream/errors_test.go:8–16  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestError_ErrorString(t *testing.T) {
9 e := New(KindTimeout, "deadline")
10 if e.Error() == "" {
11 t.Fatal("empty Error()")
12 }
13 if !strings.Contains(e.Error(), string(KindTimeout)) {
14 t.Fatalf("unexpected: %q", e.Error())
15 }
16}
17
18func TestNew(t *testing.T) {
19 e := New(KindBackendError, "msg")

Callers

nothing calls this directly

Calls 2

NewFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected