tests

package
v0.0.0-...-7ee4457 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2016 License: BSD-2-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(w io.Writer, name, pack string, other ...string) (string, error)

func GoGet

func GoGet(w io.Writer, pack string) error

func JUnit

func JUnit(r Result) junit.TestCase

func SimpleTestPackage

func SimpleTestPackage(arg ...string) string

func UpdateLibs

func UpdateLibs(w io.Writer) error

Types

type Result

type Result struct {
	Test     Test
	Error    error
	Output   string
	Duration time.Duration
}

func Run

func Run(t Test) (result Result)

type SimpleTest

type SimpleTest struct {
	Name        string
	Category    string
	Info        string
	Package     string
	Memory      int
	Stdin       []byte
	Timeout     time.Duration
	CanCrash    bool
	CanShutdown bool
	CanTimeout  bool
	CheckRun    func(string) error
	// contains filtered or unexported fields
}

func (*SimpleTest) Build

func (t *SimpleTest) Build(w io.Writer) error

func (*SimpleTest) Check

func (t *SimpleTest) Check(w io.Writer) error

func (*SimpleTest) Clean

func (t *SimpleTest) Clean(w io.Writer, success bool) (err error)

func (*SimpleTest) GetCategory

func (t *SimpleTest) GetCategory() string

func (*SimpleTest) GetInfo

func (t *SimpleTest) GetInfo() string

func (*SimpleTest) GetName

func (t *SimpleTest) GetName() string

func (*SimpleTest) Run

func (t *SimpleTest) Run(w io.Writer) error

func (*SimpleTest) Setup

func (t *SimpleTest) Setup(w io.Writer) error

type Test

type Test interface {
	GetName() string
	GetCategory() string
	GetInfo() string
	Build(io.Writer) error
	Setup(io.Writer) error
	Run(io.Writer) error
	Check(io.Writer) error
	Clean(w io.Writer, success bool) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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