MCPcopy Create free account
hub / github.com/dunglas/httpsfv / TestParseItemParamsMarshalSFV

Function TestParseItemParamsMarshalSFV

item_test.go:53–66  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

51}
52
53func TestParseItemParamsMarshalSFV(t *testing.T) {
54 t.Parallel()
55
56 i := NewItem(Token("bar"))
57 i.Params.Add("foo", 0.0)
58 i.Params.Add("baz", true)
59
60 var b strings.Builder
61 _ = i.marshalSFV(&b)
62
63 if b.String() != "bar;foo=0.0;baz" {
64 t.Error("marshalSFV(): invalid")
65 }
66}
67
68func TestUnmarshalItem(t *testing.T) {
69 t.Parallel()

Callers

nothing calls this directly

Calls 5

marshalSFVMethod · 0.95
NewItemFunction · 0.85
TokenTypeAlias · 0.85
ErrorMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…