(t *testing.T)
| 30 | } |
| 31 | |
| 32 | func TestContextGetInvalidCast(t *testing.T) { |
| 33 | c := NewContext(nil, nil) |
| 34 | |
| 35 | c.Set("key", int64(123)) |
| 36 | |
| 37 | v, err := ContextGet[bool](c, "key") |
| 38 | assert.ErrorIs(t, err, ErrInvalidKeyType) |
| 39 | assert.Equal(t, false, v) |
| 40 | } |
| 41 | |
| 42 | func TestContextGetOrOK(t *testing.T) { |
| 43 | c := NewContext(nil, nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…