layout_testbed

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option any

Option is an option passed to NewTestbed.

type Setup

type Setup struct {
	// Testbed is the layout testbed.
	Testbed *Testbed
	// Engine is the world engine.
	Engine *s4wave_world.Engine
	// LayoutResourceID is the resource ID of the created layout.
	LayoutResourceID uint32
}

Setup holds the test setup state for layout tests.

func (*Setup) Release

func (s *Setup) Release()

Release releases the setup resources.

type Testbed

type Testbed struct {
	*world_testbed.Testbed

	// ResClient is the resource client for the testbed.
	ResClient *resource_client.Client
	// contains filtered or unexported fields
}

Testbed is a constructed layout testbed.

func Default

func Default(ctx context.Context, opts ...Option) (*Testbed, error)

Default constructs the default layout testbed arrangement.

func NewTestbed

func NewTestbed(ctx context.Context, tb *world_testbed.Testbed, opts ...Option) (t *Testbed, tbErr error)

NewTestbed constructs a new layout testbed from a world testbed.

func (*Testbed) Release

func (t *Testbed) Release()

Release releases the testbed resources.

func (*Testbed) SetupLayoutEngine

func (t *Testbed) SetupLayoutEngine(ctx context.Context, objectKey string) (*Setup, error)

SetupLayoutEngine creates an engine with ObjectLayout type registered and a demo layout created. Returns the setup struct containing engine, tx, and layout resource ID.

Jump to

Keyboard shortcuts

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