(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestContextDefault(t *testing.T) { |
| 24 | ctx := context.Background() |
| 25 | nctx := NewContext(ctx) |
| 26 | |
| 27 | defaultVal := func() string { return "default" } |
| 28 | if v := FromContext(nctx, "foo", defaultVal); v != "default" { |
| 29 | t.Fatalf("Failed to get \"default\", got %q", v) |
| 30 | } |
| 31 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…