test

package
v0.0.0-...-db33f58 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2014 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expect

func Expect(t *testing.T, a interface{}, b interface{})

Warning: directly comparing functions is unreliable

func IsNillable

func IsNillable(k reflect.Kind) (nillable bool)

func MustBeNil

func MustBeNil(t *testing.T, a interface{})

mustBeNil()/mustNotBeNil() isNillable() author: courtf

func MustNotBeNil

func MustNotBeNil(t *testing.T, a interface{})

func Refute

func Refute(t *testing.T, a interface{}, b interface{})

Warning: directly comparing functions is unreliable

Types

type Restorer

type Restorer func()

restorer and patch adapted from https://gist.github.com/imosquera/6716490 thanks imosquera! Restorer holds a function that can be used to restore some previous state.

func Patch

func Patch(destination, v interface{}) (Restorer, error)

Patch sets the value pointed to by the given destination to the given value, and returns a function to restore it to its original value. The value must be assignable to the element type of the destination.

func (Restorer) Restore

func (r Restorer) Restore()

Restore restores some previous state.

Jump to

Keyboard shortcuts

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