Back to godoc.org

Package prototest

v1.25.0
Latest Go to latest

The latest major version is .

Published: Jun 22, 2020 | License: BSD-3-Clause | Module: google.golang.org/protobuf

Overview

Package prototest exercises protobuf reflection.

Index

type Enum

type Enum struct{}

Enum tests an EnumType implementation.

func (Enum) Test

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

type Message

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

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

Test performs tests on a MessageType implementation.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier