(t *testing.T)
| 93 | } |
| 94 | |
| 95 | func 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 | } |