Documentation
¶
Overview ¶
Package testutil provides testing utilities for the Aseprite MCP server.
Index ¶
- func CreateTestConfigWithPath(t *testing.T, asepritePath string) *config.Config
- func DecodeImage(r io.Reader) (image.Image, string, error)
- func FormatPixelPos(x, y int) string
- func LoadTestConfig(t *testing.T) *config.Config
- func LoadTestConfigTB(tb TB) *config.Config
- func TempSpriteDir(t *testing.T) string
- func TempSpritePath(t *testing.T, name string) string
- func TempSpritePathTB(tb TB, filename string) string
- type PixelData
- type TB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestConfigWithPath ¶
CreateTestConfigWithPath creates a test config with explicit Aseprite path. Use this when you need to override the default config for specific tests.
func DecodeImage ¶
DecodeImage decodes an image from a reader and returns the image and format.
func FormatPixelPos ¶
FormatPixelPos formats a pixel position as a string for use as a map key.
func LoadTestConfig ¶
LoadTestConfig loads the test configuration from the standard config file. Tests MUST have a valid config file with real Aseprite path configured.
func LoadTestConfigTB ¶
LoadTestConfigTB loads the test configuration for tests or benchmarks.
func TempSpriteDir ¶
TempSpriteDir returns a temporary directory for sprite files.
func TempSpritePath ¶
TempSpritePath returns a path for a temporary sprite file.
func TempSpritePathTB ¶
TempSpritePath generates a temporary sprite file path for tests/benchmarks.
Types ¶
type PixelData ¶
PixelData represents a pixel with coordinates and color for testing.
func ParsePixelData ¶
ParsePixelData parses JSON pixel data returned by get_pixels.