testlib

package
v0.0.0-...-bb97991 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testlib provides common test utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustTempDir

func MustTempDir(t *testing.T) string

MustTempDir creates a temporary directory, or dies trying.

func RemoveIfOk

func RemoveIfOk(t *testing.T, dir string)

RemoveIfOk removes the given directory, but only if we have not failed. We want to keep the failed directories for debugging.

func Rewrite

func Rewrite(t *testing.T, path, contents string) error

Rewrite a file with the given contents.

Types

This section is empty.

Jump to

Keyboard shortcuts

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