Help us shape the future of Go! Take the 2026 Go Developer Survey

testutil

package
v0.34.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertFeatureError

func AssertFeatureError(t *testing.T, err error, feature gputypes.Feature, resource string)

AssertFeatureError asserts err is a *core.FeatureError for the given feature and resource.

func AssertNoError

func AssertNoError(t *testing.T, err error)

AssertNoError fails the test if err is non-nil.

Types

type EnvOption

type EnvOption func(*ValidationEnv)

EnvOption configures a ValidationEnv.

func WithFeature

func WithFeature(feature gputypes.Feature) EnvOption

WithFeature enables a single feature.

func WithFeatures

func WithFeatures(features gputypes.Features) EnvOption

WithFeatures sets the enabled feature set.

func WithLimits

func WithLimits(limits gputypes.Limits) EnvOption

WithLimits sets device limits used by Validate* calls.

type ValidationEnv

type ValidationEnv struct {
	T        *testing.T
	Features gputypes.Features
	Limits   gputypes.Limits
}

ValidationEnv is a per-test fixture for validation scenarios (P9). One instance per t.Run; safe for t.Parallel().

func NewValidationEnv

func NewValidationEnv(t *testing.T, opts ...EnvOption) *ValidationEnv

NewValidationEnv creates a validation test fixture.

func (*ValidationEnv) CreateBindGroupWithR32FloatTexture

func (e *ValidationEnv) CreateBindGroupWithR32FloatTexture() error

CreateBindGroupWithR32FloatTexture validates float32-filterable bind rules (VAL-C21).

func (*ValidationEnv) CreatePipelineLayoutWithPushConstants

func (e *ValidationEnv) CreatePipelineLayoutWithPushConstants() error

CreatePipelineLayoutWithPushConstants validates a pipeline layout descriptor that declares push constant ranges (VAL-C4).

func (*ValidationEnv) CreateQuerySetTimestamp

func (e *ValidationEnv) CreateQuerySetTimestamp() error

CreateQuerySetTimestamp validates timestamp query set creation (VAL-C24).

func (*ValidationEnv) CreateRenderPipelineUnclippedDepth

func (e *ValidationEnv) CreateRenderPipelineUnclippedDepth() error

CreateRenderPipelineUnclippedDepth validates unclipped depth pipeline creation (VAL-C5).

func (*ValidationEnv) CreateShaderModuleWithWGSL

func (e *ValidationEnv) CreateShaderModuleWithWGSL(source string) error

CreateShaderModuleWithWGSL validates shader module creation for WGSL source (VAL-C12/C19/C20).

func (*ValidationEnv) CreateTextureWithFormat

func (e *ValidationEnv) CreateTextureWithFormat(format gputypes.TextureFormat, usage gputypes.TextureUsage) error

CreateTextureWithFormat validates texture creation for the given format and usage.

Jump to

Keyboard shortcuts

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