(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestContextGetOrInvalidCast(t *testing.T) { |
| 63 | c := NewContext(nil, nil) |
| 64 | |
| 65 | c.Set("key", int64(123)) |
| 66 | |
| 67 | v, err := ContextGetOr[float32](c, "key", float32(999)) |
| 68 | assert.ErrorIs(t, err, ErrInvalidKeyType) |
| 69 | assert.Equal(t, float32(0), v) |
| 70 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…