testlib

package
v0.0.0-...-a34aaf7 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2014 License: MIT Imports: 18 Imported by: 6

Documentation

Index

Constants

View Source
const (
	FRAMES_PER_SECOND = 15
	GOPHER_PNG        = "gopher.png"
	TIMEOUT           = time.Second * 30
)

Variables

View Source
var (
	Width, Height int = 320, 480
)

Functions

func Move

func Move(x1, y1, x2, y2 float32) error

func SaveImage

func SaveImage(filename string, img image.Image) error

Save the given image to file.

func Screenshot

func Screenshot(window mandala.Window) image.Image

Screenshot takes a screenshot of the current window and return a RGBA image.Image.

func Tap

func Tap(x, y float32) error

func TestImage

func TestImage(filename string, act image.Image, adjust imagetest.Adjuster) (float64, image.Image, image.Image, error)

TestImage compares a saved expected image of a given filename with an actual image.Image that typically contains the result of a rendering. It returns the distance value and the two compared images.

Types

type TestSuite

type TestSuite struct {
	prettytest.Suite
	// contains filtered or unexported fields
}

func NewTestSuite

func NewTestSuite() *TestSuite

func (*TestSuite) AfterAll

func (t *TestSuite) AfterAll()

func (*TestSuite) BeforeAll

func (t *TestSuite) BeforeAll()

func (*TestSuite) TestActionMove

func (t *TestSuite) TestActionMove()

func (*TestSuite) TestActionUpDown

func (t *TestSuite) TestActionUpDown()

func (*TestSuite) TestAudio

func (t *TestSuite) TestAudio()

func (*TestSuite) TestBasicCreationSequence

func (t *TestSuite) TestBasicCreationSequence()

func (*TestSuite) TestBasicExitSequence

func (t *TestSuite) TestBasicExitSequence()

func (*TestSuite) TestDraw

func (t *TestSuite) TestDraw()

func (*TestSuite) TestResourceManager

func (t *TestSuite) TestResourceManager()

Jump to

Keyboard shortcuts

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