MCPcopy
hub / github.com/git-lfs/git-lfs / TestContextOnGoErrors

Function TestContextOnGoErrors

errors/errors_test.go:45–54  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

43}
44
45func TestContextOnGoErrors(t *testing.T) {
46 err := errors.New("go error")
47
48 SetContext(err, "foo", "bar")
49
50 v := GetContext(err, "foo")
51 if v == "bar" {
52 t.Error("expected empty context on go error")
53 }
54}
55
56func TestContextOnWrappedErrors(t *testing.T) {
57 err := NewFatalError(errors.New("go error"))

Callers

nothing calls this directly

Calls 3

SetContextFunction · 0.85
GetContextFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected