MCPcopy Index your code
hub / github.com/go-openapi/jsonpointer / TestDashToken_JSONSetableReceivesRawDash

Function TestDashToken_JSONSetableReceivesRawDash

dash_token_test.go:209–222  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

207}
208
209func TestDashToken_JSONSetableReceivesRawDash(t *testing.T) {
210 t.Parallel()
211
212 // When the terminal parent implements JSONSetable, the dash token is passed through verbatim.
213 // Semantics are the user type's responsibility.
214 ds := &dashSetter{}
215 p, err := New("/-")
216 require.NoError(t, err)
217
218 _, err = p.Set(ds, 42)
219 require.NoError(t, err)
220 assert.Equal(t, "-", ds.key)
221 assert.Equal(t, 42, ds.value)
222}
223
224func TestDashToken_RoundTrip(t *testing.T) {
225 t.Parallel()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
SetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…