MCPcopy Create free account
hub / github.com/google/go-cloud / TestStringDecoder

Function TestStringDecoder

runtimevar/runtimevar_test.go:617–626  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

615}
616
617func 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
628func TestBytesDecoder(t *testing.T) {
629 input := []byte("hello world")

Callers

nothing calls this directly

Calls 1

DecodeMethod · 0.45

Tested by

no test coverage detected