(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestContextGetOrOK(t *testing.T) { |
| 43 | c := NewContext(nil, nil) |
| 44 | |
| 45 | c.Set("key", int64(123)) |
| 46 | |
| 47 | v, err := ContextGetOr[int64](c, "key", 999) |
| 48 | assert.NoError(t, err) |
| 49 | assert.Equal(t, int64(123), v) |
| 50 | } |
| 51 | |
| 52 | func TestContextGetOrNonExistentKey(t *testing.T) { |
| 53 | c := NewContext(nil, nil) |
nothing calls this directly
no test coverage detected
searching dependent graphs…