MCPcopy Create free account
hub / github.com/DoNewsCode/core / TestCodec_Marshal

Function TestCodec_Marshal

codec/yaml/yaml_test.go:95–104  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestCodec_Marshal(t *testing.T) {
96 value := map[string]string{"v": "hi"}
97 got, err := (Codec{}).Marshal(value)
98 if err != nil {
99 t.Fatalf("should not return err")
100 }
101 if string(got) != "v: hi\n" {
102 t.Fatalf("want \"v: hi\n\" return \"%s\"", string(got))
103 }
104}

Callers

nothing calls this directly

Calls 1

MarshalMethod · 0.65

Tested by

no test coverage detected