test

package
Version: v0.0.0-...-7f3e199 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonBenchmarkResize

func CommonBenchmarkResize(
	proc imageprocessorcommon.ImageProcessor,
	b *testing.B,
	widthMin, widthMax, heightMin, heightMax uint,
)

CommonBenchmarkResize is a function to run a benchmark for method `Resize` of an abstract ImageProcessor implementation.

func CommonBenchmarkResize_largePictures

func CommonBenchmarkResize_largePictures(proc imageprocessorcommon.ImageProcessor, b *testing.B)

CommonBenchmarkResize_largePictures is a function to run a benchmark for method `Resize` of an abstract ImageProcessor implementation on large images.

func CommonBenchmarkResize_mediumPictures

func CommonBenchmarkResize_mediumPictures(proc imageprocessorcommon.ImageProcessor, b *testing.B)

CommonBenchmarkResize_mediumPictures is a function to run a benchmark for method `Resize` of an abstract ImageProcessor implementation on medium images.

func CommonBenchmarkResize_smallPictures

func CommonBenchmarkResize_smallPictures(proc imageprocessorcommon.ImageProcessor, b *testing.B)

CommonBenchmarkResize_smallPictures is a function to run a benchmark for method `Resize` of an abstract ImageProcessor implementation on small images.

func CommonTestResize

func CommonTestResize(proc imageprocessorcommon.ImageProcessor, t *testing.T)

CommonTestResize verifies if the method `Resize` of an ImageProcessor works correcty.

Types

type Item

type Item struct {
	InputFile    []byte
	InputWidth   uint
	InputHeight  uint
	OutputFile   []byte // if nil then don't test by "OutputFile"
	OutputWidth  uint
	OutputHeight uint
}

Item is a dataset item to be use for testing/benchmarking of ImageProcessor implementations

func Dataset

func Dataset() (result []Item)

Dataset returns an in-memory dataset of pictures to be used for testing/benchmarking of ImageProcessor implementations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL