test

package
v0.0.0-...-baef74e Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctx

type Ctx struct {
	Tester
	BaseDir string
}

func NewCtx

func NewCtx(t Tester) *Ctx

NewCtx creates a new Context

ctx := test.NewCtx()
defer ctx.Clean()
ctx.File(...).WriteSTring

func (*Ctx) Cleanup

func (c *Ctx) Cleanup()

func (*Ctx) File

func (c *Ctx) File(name string) *File

func (*Ctx) Mkpath

func (c *Ctx) Mkpath(name string) string

type File

type File struct {
	*Ctx
	Path string
}

func (*File) FullPath

func (f *File) FullPath() string

func (*File) Mkdir

func (f *File) Mkdir()

func (*File) Read

func (f *File) Read() []byte

func (*File) WriteString

func (f *File) WriteString(body string)

type Tester

type Tester interface {
	Errorf(string, ...interface{})
	Fatalf(string, ...interface{})
	Logf(string, ...interface{})
}

Jump to

Keyboard shortcuts

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