io

package
v0.0.0-...-e494a0c Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestCases

func TestCases(f TestCaseFunc)

func TestCasesInteractive

func TestCasesInteractive(f TestCaseFunc)

Types

type CompareOutput

type CompareOutput struct {
	// contains filtered or unexported fields
}

func NewCompareOutput

func NewCompareOutput(correctF io.Reader) *CompareOutput

func (*CompareOutput) GetOutput

func (co *CompareOutput) GetOutput(i int) []byte

func (*CompareOutput) HasOutput

func (co *CompareOutput) HasOutput(i int) bool

type Input

type Input struct {
	// contains filtered or unexported fields
}

func (*Input) BigInt

func (i *Input) BigInt() *big.Int

func (*Input) Bytes

func (i *Input) Bytes() []byte

func (*Input) Digits

func (i *Input) Digits() []int

func (*Input) Float64

func (i *Input) Float64() float64

func (*Input) Int

func (i *Input) Int() int

func (*Input) Scan

func (i *Input) Scan()

func (*Input) SliceBytes

func (i *Input) SliceBytes(n int) [][]byte

func (*Input) SliceFloat64

func (i *Input) SliceFloat64(n int) slice.SliceFloat64

func (*Input) SliceInt

func (i *Input) SliceInt(n int) slice.SliceInt

func (*Input) SliceSliceFloat64

func (input *Input) SliceSliceFloat64(n, m int) slice.SliceSliceFloat64

func (*Input) SliceSliceInt

func (input *Input) SliceSliceInt(n, m int) slice.SliceSliceInt

func (*Input) SliceSliceString

func (input *Input) SliceSliceString(n, m int) slice.SliceSliceString

func (*Input) SliceString

func (i *Input) SliceString(n int) slice.SliceString

func (*Input) String

func (i *Input) String() string

type InputProvider

type InputProvider interface {
	Scan() bool
	Text() string
	Bytes() []byte
	Err() error
}

type Output

type Output struct {
	// contains filtered or unexported fields
}

func (*Output) AssertByteCount

func (o *Output) AssertByteCount(a byte, count int, fatal ...bool)

func (*Output) AssertCount

func (o *Output) AssertCount(count int, fatal ...bool)

func (*Output) AssertEqual

func (o *Output) AssertEqual(data string, fatal ...bool)

func (*Output) AssertIntEqual

func (o *Output) AssertIntEqual(a, b int, fatal ...bool)

func (*Output) AssertNoError

func (o *Output) AssertNoError(e error, fatal ...bool)

func (*Output) AssertTrue

func (o *Output) AssertTrue(a bool, fatal ...bool)

func (*Output) Debug

func (o *Output) Debug(a ...interface{})

func (*Output) DebugCase

func (o *Output) DebugCase()

func (*Output) Debugf

func (o *Output) Debugf(format string, a ...interface{})

func (*Output) Fatal

func (o *Output) Fatal(a ...interface{})

func (*Output) Fatalf

func (o *Output) Fatalf(format string, a ...interface{})

func (*Output) Periodic

func (o *Output) Periodic(a ...interface{})

func (*Output) PeriodicCount

func (o *Output) PeriodicCount()

func (*Output) PeriodicInt

func (o *Output) PeriodicInt(a int)

func (*Output) Periodicf

func (o *Output) Periodicf(format string, a ...interface{})

func (*Output) Point

func (o *Output) Point(x, y float64)

func (*Output) PointInt

func (o *Output) PointInt(x, y int)

func (*Output) Print

func (o *Output) Print(a ...interface{})

func (*Output) PrintFloat64

func (o *Output) PrintFloat64(a float64)

func (*Output) Printf

func (o *Output) Printf(format string, a ...interface{})

func (*Output) Println

func (o *Output) Println(a ...interface{})

func (*Output) TimerStart

func (o *Output) TimerStart(key string)

func (*Output) TimerStop

func (o *Output) TimerStop(key string)

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func NewParser

func NewParser(f TestCaseFunc) Parser

func (*Parser) Parse

func (parser *Parser) Parse(input io.Reader, output io.Writer)

func (*Parser) ParseFile

func (parser *Parser) ParseFile()

func (*Parser) SetFn

func (parser *Parser) SetFn(inputFn string)

type TestCaseFunc

type TestCaseFunc func(*Input, *Output)

type Timer

type Timer struct {
	Total time.Duration
	// contains filtered or unexported fields
}

Timer type

func (*Timer) Start

func (t *Timer) Start()

Start timer

func (*Timer) Stop

func (t *Timer) Stop(startTime time.Time)

Stop timer and add to total

Jump to

Keyboard shortcuts

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