assert

package
v0.0.0-...-b88c69b Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2024 License: ISC Imports: 7 Imported by: 1

Documentation

Overview

Package assert provides test assertion helpers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(tb testing.TB, c io.Closer)

func Equal

func Equal(tb testing.TB, exp, got interface{})

func Error

func Error(tb testing.TB, err error)

func ErrorString

func ErrorString(tb testing.TB, err error, msg string)

func False

func False(tb testing.TB, v bool)

func JSON

func JSON(tb testing.TB, exp, got interface{})

func NotEqual

func NotEqual(tb testing.TB, v1, v2 interface{})

func ReadFile

func ReadFile(tb testing.TB, fp string) (data []byte)

func Remove

func Remove(tb testing.TB, fp string)

func RemoveAll

func RemoveAll(tb testing.TB, fp string)

func Runes

func Runes(tb testing.TB, exp, got string)

func String

func String(tb testing.TB, exp, got string)

func StringJSON

func StringJSON(tb testing.TB, exp string, got interface{})

func Success

func Success(tb testing.TB, err error)

func TempDir

func TempDir(tb testing.TB) (dir string, cleanup func())

func Testdata

func Testdata(tb testing.TB, ext string, got []byte)

func TestdataDir

func TestdataDir(tb testing.TB, dir string)

func TestdataJSON

func TestdataJSON(tb testing.TB, got interface{})

func True

func True(tb testing.TB, v bool)

func WriteFile

func WriteFile(tb testing.TB, fp string, data []byte, perms os.FileMode)

Types

This section is empty.

Jump to

Keyboard shortcuts

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