testlib

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2014 License: LGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package testlib provides varous utilities for testing purposes

Index

Constants

View Source
const (
	FirstSubDir = "nothing"
)

Variables

This section is empty.

Functions

func MakeDatasetOrPanic

func MakeDatasetOrPanic() (string, string, string)

Create a dataset for testing and return the newly created directory

func MakeFileOrPanic

func MakeFileOrPanic(path string, size int) string

Create a new file at given path and size, without possibly required intermediate directories

func ResultHandler

func ResultHandler(t *testing.T, logOnly bool) func(api.Result)

Return a function makes tests fail if there was an error result during an operation If logOnly is True, errors will not make the test fail. Useful if errors are expected.

func RmTree

func RmTree(tree string)

Delete the given tree entirely. Should only be used in conjunction with makeDataset Panics if something is wrong Will only do the work if we are not already in panic

Types

This section is empty.

Directories

Path Synopsis
The cosmic tool helps to corrupt data.
The cosmic tool helps to corrupt data.

Jump to

Keyboard shortcuts

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