(t *testing.T)
| 615 | } |
| 616 | |
| 617 | func TestStringDecoder(t *testing.T) { |
| 618 | input := "hello world" |
| 619 | got, err := StringDecoder.Decode(context.Background(), []byte(input)) |
| 620 | if err != nil { |
| 621 | t.Fatalf("error: %v", err) |
| 622 | } |
| 623 | if input != got.(string) { |
| 624 | t.Errorf("output got %v, want %q", got, input) |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | func TestBytesDecoder(t *testing.T) { |
| 629 | input := []byte("hello world") |