(t *testing.T)
| 20 | } |
| 21 | |
| 22 | func TestContextGetNonExistentKey(t *testing.T) { |
| 23 | c := NewContext(nil, nil) |
| 24 | |
| 25 | c.Set("key", int64(123)) |
| 26 | |
| 27 | v, err := ContextGet[int64](c, "nope") |
| 28 | assert.ErrorIs(t, err, ErrNonExistentKey) |
| 29 | assert.Equal(t, int64(0), v) |
| 30 | } |
| 31 | |
| 32 | func TestContextGetInvalidCast(t *testing.T) { |
| 33 | c := NewContext(nil, nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…