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

Function TestContextSetGetPanicsWhenKeyNotComparable

context_test.go:366–374  ·  context_test.go::TestContextSetGetPanicsWhenKeyNotComparable
(t *testing.T)

Source from the content-addressed store, hash-verified

364}
365
366func TestContextSetGetPanicsWhenKeyNotComparable(t *testing.T) {
367 c, _ := CreateTestContext(httptest.NewRecorder())
368
369 assert.Panics(t, func() {
370 c.Set([]int{1}, 1)
371 c.Set(func() {}, 1)
372 c.Set(make(chan int), 1)
373 })
374}
375
376func TestContextSetGetValues(t *testing.T) {
377 c, _ := CreateTestContext(httptest.NewRecorder())

Callers

nothing calls this directly

Calls 2

CreateTestContextFunction · 0.85
SetMethod · 0.80

Tested by

no test coverage detected