fixture

package
v0.0.0-...-d09d7ef Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package fixture is an internal package providing sample images and expected rendering results. Verifying that asciist rendered an image "correctly" is subjective and requires human eyes, so we use a "snapshot testing" approach where the output of a judged-good run is saved and used for regression testing. (see https://facebook.github.io/jest/docs/snapshot-testing.html)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFixture

func LoadFixture(imgFilename string) (img image.Image, width uint, art string)

LoadFixture loads a fixture image bundled with this package. The width used in rendering is determined automatically from the length of the first line of the saved (known-good) output. This must be called from a working directory adjacent to the fixture directory.

func ReadFixture

func ReadFixture(imgFilename string) (img *bytes.Reader, width uint, art string)

ReadFixture loads a fixture image bundled with this package. The width used in rendering is determined automatically from the length of the first line of the saved (known-good) output. This must be called from a working directory adjacent to the fixture directory.

Types

This section is empty.

Jump to

Keyboard shortcuts

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