prototest

package
v1.33.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 5, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package prototest exercises protobuf reflection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enum added in v1.25.0

type Enum struct{}

Enum tests an protoreflect.EnumType implementation.

func (Enum) Test added in v1.25.0

func (test Enum) Test(t testing.TB, et protoreflect.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 protoreflect.FullName) (protoreflect.ExtensionType, error)
		FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
		RangeExtensionsByMessage(message protoreflect.FullName, f func(protoreflect.ExtensionType) bool)
	}
}

Message tests a message implementation.

func (Message) Test

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

Test performs tests on a protoreflect.MessageType implementation.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL