protobuf: google.golang.org/protobuf/testing/prototest Index | Files

package prototest

import "google.golang.org/protobuf/testing/prototest"

Package prototest exercises protobuf reflection.

Index

Package Files

enum.go prototest.go

type Enum Uses

type Enum struct{}

Enum tests an EnumType implementation.

func (Enum) Test Uses

func (test Enum) Test(t testing.TB, et pref.EnumType)

type Message Uses

type Message struct {
    // Resolver is used to determine the list of extension fields to test with.
    // If nil, this defaults to using protoregistry.GlobalTypes.
    Resolver interface {
        FindExtensionByName(field pref.FullName) (pref.ExtensionType, error)
        FindExtensionByNumber(message pref.FullName, field pref.FieldNumber) (pref.ExtensionType, error)
        RangeExtensionsByMessage(message pref.FullName, f func(pref.ExtensionType) bool)
    }
}

Message tests a message implemention.

func (Message) Test Uses

func (test Message) Test(t testing.TB, mt pref.MessageType)

Test performs tests on a MessageType implementation.

Package prototest imports 11 packages (graph). Updated 2020-07-14. Refresh now. Tools for package owners.