(t *testing.T)
| 198 | } |
| 199 | |
| 200 | func (s) TestDecodeMetadataHeader(t *testing.T) { |
| 201 | for _, test := range []struct { |
| 202 | // input |
| 203 | kin string |
| 204 | vin string |
| 205 | // output |
| 206 | vout string |
| 207 | err error |
| 208 | }{ |
| 209 | {"a", "abc", "abc", nil}, |
| 210 | {"key-bin", "Zm9vAGJhcg==", "foo\x00bar", nil}, |
| 211 | {"key-bin", "Zm9vAGJhcg", "foo\x00bar", nil}, |
| 212 | {"key-bin", "woA=", binaryValue, nil}, |
| 213 | {"a", "abc,efg", "abc,efg", nil}, |
| 214 | } { |
| 215 | v, err := decodeMetadataHeader(test.kin, test.vin) |
| 216 | if !reflect.DeepEqual(v, test.vout) || !reflect.DeepEqual(err, test.err) { |
| 217 | t.Fatalf("decodeMetadataHeader(%q, %q) = %q, %v, want %q, %v", test.kin, test.vin, v, err, test.vout, test.err) |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | func (s) TestParseDialTarget(t *testing.T) { |
| 223 | for _, test := range []struct { |
nothing calls this directly
no test coverage detected