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

Function TestDecodeError_Accessors

errors_test.go:189–203  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

187}
188
189func TestDecodeError_Accessors(t *testing.T) {
190 e := DecodeError{
191 message: "foo",
192 line: 1,
193 column: 2,
194 key: []string{"one", "two"},
195 human: "bar",
196 }
197 assert.Equal(t, "toml: foo", e.Error())
198 r, c := e.Position()
199 assert.Equal(t, 1, r)
200 assert.Equal(t, 2, c)
201 assert.Equal(t, Key{"one", "two"}, e.Key())
202 assert.Equal(t, "bar", e.String())
203}
204
205func TestDecodeError_DuplicateContent(t *testing.T) {
206 // This test verifies that when the same content appears multiple times

Callers

nothing calls this directly

Calls 5

ErrorMethod · 0.95
PositionMethod · 0.95
KeyMethod · 0.95
StringMethod · 0.95
EqualFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…