(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestContextGetOrNonExistentKey(t *testing.T) { |
| 53 | c := NewContext(nil, nil) |
| 54 | |
| 55 | c.Set("key", int64(123)) |
| 56 | |
| 57 | v, err := ContextGetOr[int64](c, "nope", 999) |
| 58 | assert.NoError(t, err) |
| 59 | assert.Equal(t, int64(999), v) |
| 60 | } |
| 61 | |
| 62 | func TestContextGetOrInvalidCast(t *testing.T) { |
| 63 | c := NewContext(nil, nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…