MCPcopy Create free account
hub / github.com/cel-expr/cel-go / TestErrorAsIssues

Function TestErrorAsIssues

cel/env_test.go:92–100  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

90}
91
92func TestErrorAsIssues(t *testing.T) {
93 iss := ErrorAsIssues(errors.New("wrapped-error"))
94 if iss.Err() == nil {
95 t.Fatal("iss.Err() got nil, wanted 'wrapped-error'")
96 }
97 if !strings.Contains(iss.Err().Error(), "wrapped-error") {
98 t.Errorf("iss.Err() got %v, wanted 'wrapped-error'", iss.Err())
99 }
100}
101
102func TestIssuesAppendSelf(t *testing.T) {
103 e, err := NewEnv()

Callers

nothing calls this directly

Calls 5

ErrorAsIssuesFunction · 0.85
NewMethod · 0.80
ErrMethod · 0.80
ContainsMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected