MCPcopy
hub / github.com/pelletier/go-toml / TestUnmarshalerInterfaceFixedArrayElements

Function TestUnmarshalerInterfaceFixedArrayElements

unmarshaler_test.go:5237–5251  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

5235}
5236
5237func TestUnmarshalerInterfaceFixedArrayElements(t *testing.T) {
5238 doc := `
5239[[item]]
5240a = 1
5241[[item]]
5242a = 2
5243`
5244 type target struct {
5245 Item [2]rawRecorder
5246 }
5247 x := target{}
5248 assert.NoError(t, decodeRaw(t, doc, &x))
5249 assert.True(t, strings.Contains(x.Item[0].Raw, "a = 1"))
5250 assert.True(t, strings.Contains(x.Item[1].Raw, "a = 2"))
5251}
5252
5253func TestUnmarshalerInterfaceKeyValueTargets(t *testing.T) {
5254 doc := `

Callers

nothing calls this directly

Calls 3

NoErrorFunction · 0.92
TrueFunction · 0.92
decodeRawFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…