MCPcopy
hub / github.com/gin-gonic/gin / TestContextWithKeysMutex

Function TestContextWithKeysMutex

context_test.go:3087–3098  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3085}
3086
3087func TestContextWithKeysMutex(t *testing.T) {
3088 c := &Context{}
3089 c.Set("foo", "bar")
3090
3091 value, err := c.Get("foo")
3092 assert.Equal(t, "bar", value)
3093 assert.True(t, err)
3094
3095 value, err = c.Get("foo2")
3096 assert.Nil(t, value)
3097 assert.False(t, err)
3098}
3099
3100func TestRemoteIPFail(t *testing.T) {
3101 c, _ := CreateTestContext(httptest.NewRecorder())

Callers

nothing calls this directly

Calls 2

SetMethod · 0.95
GetMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…