test

package
v2.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: AGPL-3.0, AGPL-3.0-or-later Imports: 4 Imported by: 0

Documentation

Overview

Package test contains utility functions used throughout the project in tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertBufferEquals

func AssertBufferEquals(t *testing.T, buf, std []byte)

AssertBufferEquals asserts two buffers are equal

func AssertDeepEquals

func AssertDeepEquals(t *testing.T, res, std interface{})

AssertDeepEquals asserts two values are deeply equal or fails the test, if not

func AssertFileEquals

func AssertFileEquals(t *testing.T, path string, std []byte)

AssertFileEquals reads a file from disk and asserts it equals the standard buffer

func LogUnexpected

func LogUnexpected(t *testing.T, expected, got interface{})

LogUnexpected fails the test and prints the values in an `expected: X got: Y` format

func UnexpectedError

func UnexpectedError(t *testing.T, err error)

UnexpectedError fails the test with an unexpected error message

Types

This section is empty.

Jump to

Keyboard shortcuts

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