tree: fa4bc263f62a920fa0042341ba9f35159c0d1884 [path history] [tgz]
  1. bytes.go
  2. README.md
  3. test.go
  4. test_binary.go
binary/test/README.md

test


import "android.googlesource.com/platform/tools/gpu/binary/test"

Usage

var BadObject = &BadType{data: "BadObject"}
var ObjectA = &TypeA{data: "ObjectA"}
var ObjectB = &TypeB{data: "ObjectB"}

func DecodeObject

func DecodeObject(t *testing.T, entry Entry, d binary.Decoder, reader *bytes.Reader)

func DecodeValue

func DecodeValue(t *testing.T, entry Entry, d binary.Decoder, reader *bytes.Reader)

func EncodeObject

func EncodeObject(t *testing.T, entry Entry, e binary.Encoder, buf *bytes.Buffer)

func EncodeValue

func EncodeValue(t *testing.T, entry Entry, e binary.Encoder, buf *bytes.Buffer)

func VerifyData

func VerifyData(t *testing.T, entry Entry, got *bytes.Buffer)

type BadType

type BadType struct {
	binary.Generate `disable:"true"`
}

type Entry

type Entry struct {
	Name   string
	Values []binary.Object
	Data   []byte
}

type TypeA

type TypeA struct {
	binary.Generate
}

func (*TypeA) Class

func (*TypeA) Class() binary.Class

type TypeB

type TypeB struct {
	binary.Generate
}

func (*TypeB) Class

func (*TypeB) Class() binary.Class