noxtest

package
v0.0.0-...-7551c24 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package noxtest implements different test helper functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataPath

func DataPath(t testing.TB, sub ...string) string

func WritePNG

func WritePNG(t testing.TB, path string, img image.Image, exp string)

Types

type MockPlatform

type MockPlatform struct {
	T time.Duration
}

MockPlatform is a mock Platform implementation to allow test using ticks

func (*MockPlatform) RandInt

func (p *MockPlatform) RandInt() int

func (*MockPlatform) RandSeed

func (p *MockPlatform) RandSeed(seed int64)

func (*MockPlatform) RandSeedTime

func (p *MockPlatform) RandSeedTime()

func (*MockPlatform) Sleep

func (p *MockPlatform) Sleep(dt time.Duration)

func (*MockPlatform) Ticks

func (p *MockPlatform) Ticks() time.Duration

func (*MockPlatform) TimeSeed

func (p *MockPlatform) TimeSeed() int64

Jump to

Keyboard shortcuts

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