conformance

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package conformance provides programmatically-built TestAllTypes message descriptors and a dedicated TypeRegistry for conformance testing against the official protobuf conformance test suite.

The package builds two top-level descriptors:

  • TestAllTypesProto3Desc: the proto3 variant covering all scalar, enum, message, map, oneof, repeated, packed, and well-known-type field kinds.
  • TestAllTypesProto2Desc: the proto2 variant adding required fields and default value semantics.

ConformanceRegistry is a self-contained TypeRegistry populated with both TestAllTypes descriptors, their nested types, map entry types, and all standard well-known types. It is used by the conformance test runner to resolve type URLs during JSON and text format round-trip testing.

All descriptors are constructed at init time (or via the explicit Register function for TinyGo) using the descriptor builder API. The package supports three serialization formats: binary (wire format), JSON, and text format.

This package has zero external dependencies beyond this module's own packages: descriptor, registry, scalar, and wkt.

Index

Constants

This section is empty.

Variables

View Source
var (
	// TestAllTypesProto3Desc is the message descriptor for the proto3
	// variant of TestAllTypes, covering all scalar, enum, message, map,
	// oneof, repeated, packed, and well-known-type field kinds.
	TestAllTypesProto3Desc descriptor.MessageDescriptorAccessor

	// TestAllTypesProto2Desc is the message descriptor for the proto2
	// variant of TestAllTypes, adding required fields and default value
	// semantics to the proto3 coverage.
	TestAllTypesProto2Desc descriptor.MessageDescriptorAccessor

	// ConformanceRegistry is the dedicated TypeRegistry populated with
	// both TestAllTypes descriptors, their nested types, map entry types,
	// and all standard well-known types. It is used by the conformance
	// test runner to resolve type URLs.
	ConformanceRegistry *registry.TypeRegistry
)

Functions

func Register

func Register()

Register builds all conformance test message descriptors and the dedicated type registry. Under standard Go this is handled by init(); under TinyGo consumers must call Register() explicitly.

Types

This section is empty.

Jump to

Keyboard shortcuts

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