Documentation
¶
Index ¶
- func Contains(t testing.T, expectedElement interface{}, container interface{}, ...) bool
- func ContainsBool(t testing.T, expectedElement bool, container interface{}, msg ...interface{}) bool
- func ContainsByte(t testing.T, expectedElement byte, container interface{}, msg ...interface{}) bool
- func ContainsComplex128(t testing.T, expectedElement complex128, container interface{}, ...) bool
- func ContainsComplex64(t testing.T, expectedElement complex64, container interface{}, ...) bool
- func ContainsError(t testing.T, expectedElement error, container interface{}, msg ...interface{}) bool
- func ContainsFloat32(t testing.T, expectedElement float32, container interface{}, ...) bool
- func ContainsFloat64(t testing.T, expectedElement float64, container interface{}, ...) bool
- func ContainsInt(t testing.T, expectedElement int, container interface{}, msg ...interface{}) bool
- func ContainsInt16(t testing.T, expectedElement int16, container interface{}, msg ...interface{}) bool
- func ContainsInt32(t testing.T, expectedElement int32, container interface{}, msg ...interface{}) bool
- func ContainsInt64(t testing.T, expectedElement int64, container interface{}, msg ...interface{}) bool
- func ContainsInt8(t testing.T, expectedElement int8, container interface{}, msg ...interface{}) bool
- func ContainsRune(t testing.T, expectedElement rune, container interface{}, msg ...interface{}) bool
- func ContainsString(t testing.T, expectedElement string, container interface{}, msg ...interface{}) bool
- func ContainsUint(t testing.T, expectedElement uint, container interface{}, msg ...interface{}) bool
- func ContainsUint16(t testing.T, expectedElement uint16, container interface{}, msg ...interface{}) bool
- func ContainsUint32(t testing.T, expectedElement uint32, container interface{}, msg ...interface{}) bool
- func ContainsUint64(t testing.T, expectedElement uint64, container interface{}, msg ...interface{}) bool
- func ContainsUint8(t testing.T, expectedElement uint8, container interface{}, msg ...interface{}) bool
- func ContainsUintptr(t testing.T, expectedElement uintptr, container interface{}, ...) bool
- func DeepEqual(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func Empty(t testing.T, container interface{}, msg ...interface{}) bool
- func Equal(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func EqualBool(t testing.T, left bool, right bool, msg ...interface{}) bool
- func EqualByte(t testing.T, left byte, right byte, msg ...interface{}) bool
- func EqualComplex128(t testing.T, left complex128, right complex128, msg ...interface{}) bool
- func EqualComplex64(t testing.T, left complex64, right complex64, msg ...interface{}) bool
- func EqualError(t testing.T, left error, right error, msg ...interface{}) bool
- func EqualFloat32(t testing.T, left float32, right float32, msg ...interface{}) bool
- func EqualFloat64(t testing.T, left float64, right float64, msg ...interface{}) bool
- func EqualInt(t testing.T, left int, right int, msg ...interface{}) bool
- func EqualInt16(t testing.T, left int16, right int16, msg ...interface{}) bool
- func EqualInt32(t testing.T, left int32, right int32, msg ...interface{}) bool
- func EqualInt64(t testing.T, left int64, right int64, msg ...interface{}) bool
- func EqualInt8(t testing.T, left int8, right int8, msg ...interface{}) bool
- func EqualRune(t testing.T, left rune, right rune, msg ...interface{}) bool
- func EqualString(t testing.T, left string, right string, msg ...interface{}) bool
- func EqualTypes(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func EqualUint(t testing.T, left uint, right uint, msg ...interface{}) bool
- func EqualUint16(t testing.T, left uint16, right uint16, msg ...interface{}) bool
- func EqualUint32(t testing.T, left uint32, right uint32, msg ...interface{}) bool
- func EqualUint64(t testing.T, left uint64, right uint64, msg ...interface{}) bool
- func EqualUint8(t testing.T, left uint8, right uint8, msg ...interface{}) bool
- func EqualUintptr(t testing.T, left uintptr, right uintptr, msg ...interface{}) bool
- func Failed(t testing.T, fmtstr string, args ...interface{})
- func False(t testing.T, tval bool, msg ...interface{}) bool
- func Nil(t testing.T, tval interface{}, msg ...interface{}) bool
- func NotContains(t testing.T, expectedElement interface{}, container interface{}, ...) bool
- func NotContainsBool(t testing.T, expectedElement bool, container interface{}, msg ...interface{}) bool
- func NotContainsByte(t testing.T, expectedElement byte, container interface{}, msg ...interface{}) bool
- func NotContainsComplex128(t testing.T, expectedElement complex128, container interface{}, ...) bool
- func NotContainsComplex64(t testing.T, expectedElement complex64, container interface{}, ...) bool
- func NotContainsError(t testing.T, expectedElement error, container interface{}, msg ...interface{}) bool
- func NotContainsFloat32(t testing.T, expectedElement float32, container interface{}, ...) bool
- func NotContainsFloat64(t testing.T, expectedElement float64, container interface{}, ...) bool
- func NotContainsInt(t testing.T, expectedElement int, container interface{}, msg ...interface{}) bool
- func NotContainsInt16(t testing.T, expectedElement int16, container interface{}, msg ...interface{}) bool
- func NotContainsInt32(t testing.T, expectedElement int32, container interface{}, msg ...interface{}) bool
- func NotContainsInt64(t testing.T, expectedElement int64, container interface{}, msg ...interface{}) bool
- func NotContainsInt8(t testing.T, expectedElement int8, container interface{}, msg ...interface{}) bool
- func NotContainsRune(t testing.T, expectedElement rune, container interface{}, msg ...interface{}) bool
- func NotContainsString(t testing.T, expectedElement string, container interface{}, msg ...interface{}) bool
- func NotContainsUint(t testing.T, expectedElement uint, container interface{}, msg ...interface{}) bool
- func NotContainsUint16(t testing.T, expectedElement uint16, container interface{}, msg ...interface{}) bool
- func NotContainsUint32(t testing.T, expectedElement uint32, container interface{}, msg ...interface{}) bool
- func NotContainsUint64(t testing.T, expectedElement uint64, container interface{}, msg ...interface{}) bool
- func NotContainsUint8(t testing.T, expectedElement uint8, container interface{}, msg ...interface{}) bool
- func NotContainsUintptr(t testing.T, expectedElement uintptr, container interface{}, ...) bool
- func NotDeepEqual(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func NotEmpty(t testing.T, container interface{}, msg ...interface{}) bool
- func NotEqual(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func NotEqualBool(t testing.T, left bool, right bool, msg ...interface{}) bool
- func NotEqualByte(t testing.T, left byte, right byte, msg ...interface{}) bool
- func NotEqualComplex128(t testing.T, left complex128, right complex128, msg ...interface{}) bool
- func NotEqualComplex64(t testing.T, left complex64, right complex64, msg ...interface{}) bool
- func NotEqualError(t testing.T, left error, right error, msg ...interface{}) bool
- func NotEqualFloat32(t testing.T, left float32, right float32, msg ...interface{}) bool
- func NotEqualFloat64(t testing.T, left float64, right float64, msg ...interface{}) bool
- func NotEqualInt(t testing.T, left int, right int, msg ...interface{}) bool
- func NotEqualInt16(t testing.T, left int16, right int16, msg ...interface{}) bool
- func NotEqualInt32(t testing.T, left int32, right int32, msg ...interface{}) bool
- func NotEqualInt64(t testing.T, left int64, right int64, msg ...interface{}) bool
- func NotEqualInt8(t testing.T, left int8, right int8, msg ...interface{}) bool
- func NotEqualRune(t testing.T, left rune, right rune, msg ...interface{}) bool
- func NotEqualString(t testing.T, left string, right string, msg ...interface{}) bool
- func NotEqualTypes(t testing.T, left interface{}, right interface{}, msg ...interface{}) bool
- func NotEqualUint(t testing.T, left uint, right uint, msg ...interface{}) bool
- func NotEqualUint16(t testing.T, left uint16, right uint16, msg ...interface{}) bool
- func NotEqualUint32(t testing.T, left uint32, right uint32, msg ...interface{}) bool
- func NotEqualUint64(t testing.T, left uint64, right uint64, msg ...interface{}) bool
- func NotEqualUint8(t testing.T, left uint8, right uint8, msg ...interface{}) bool
- func NotEqualUintptr(t testing.T, left uintptr, right uintptr, msg ...interface{}) bool
- func NotNil(t testing.T, tval interface{}, msg ...interface{}) bool
- func Panics(t testing.T, f func(), msg ...interface{}) bool
- func PanicsWith(t testing.T, expected interface{}, f func(), msg ...interface{}) bool
- func True(t testing.T, tval bool, msg ...interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains(t testing.T, expectedElement interface{}, container interface{}, msg ...interface{}) bool
Contains tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The type of elements within `container` must match the type of `expectedElement`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsBool ¶
func ContainsBool(t testing.T, expectedElement bool, container interface{}, msg ...interface{}) bool
ContainsBool tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `bool`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsByte ¶
func ContainsByte(t testing.T, expectedElement byte, container interface{}, msg ...interface{}) bool
ContainsByte tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `byte`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsComplex128 ¶
func ContainsComplex128(t testing.T, expectedElement complex128, container interface{}, msg ...interface{}) bool
ContainsComplex128 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `complex128`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsComplex64 ¶
func ContainsComplex64(t testing.T, expectedElement complex64, container interface{}, msg ...interface{}) bool
ContainsComplex64 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `complex64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsError ¶
func ContainsError(t testing.T, expectedElement error, container interface{}, msg ...interface{}) bool
ContainsError tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `error`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsFloat32 ¶
func ContainsFloat32(t testing.T, expectedElement float32, container interface{}, msg ...interface{}) bool
ContainsFloat32 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `float32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsFloat64 ¶
func ContainsFloat64(t testing.T, expectedElement float64, container interface{}, msg ...interface{}) bool
ContainsFloat64 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `float64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsInt ¶
ContainsInt tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `int`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsInt16 ¶
func ContainsInt16(t testing.T, expectedElement int16, container interface{}, msg ...interface{}) bool
ContainsInt16 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `int16`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsInt32 ¶
func ContainsInt32(t testing.T, expectedElement int32, container interface{}, msg ...interface{}) bool
ContainsInt32 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `int32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsInt64 ¶
func ContainsInt64(t testing.T, expectedElement int64, container interface{}, msg ...interface{}) bool
ContainsInt64 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `int64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsInt8 ¶
func ContainsInt8(t testing.T, expectedElement int8, container interface{}, msg ...interface{}) bool
ContainsInt8 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `int8`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsRune ¶
func ContainsRune(t testing.T, expectedElement rune, container interface{}, msg ...interface{}) bool
ContainsRune tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `rune`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsString ¶
func ContainsString(t testing.T, expectedElement string, container interface{}, msg ...interface{}) bool
ContainsString tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `string`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUint ¶
func ContainsUint(t testing.T, expectedElement uint, container interface{}, msg ...interface{}) bool
ContainsUint tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uint`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUint16 ¶
func ContainsUint16(t testing.T, expectedElement uint16, container interface{}, msg ...interface{}) bool
ContainsUint16 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uint16`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUint32 ¶
func ContainsUint32(t testing.T, expectedElement uint32, container interface{}, msg ...interface{}) bool
ContainsUint32 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uint32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUint64 ¶
func ContainsUint64(t testing.T, expectedElement uint64, container interface{}, msg ...interface{}) bool
ContainsUint64 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uint64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUint8 ¶
func ContainsUint8(t testing.T, expectedElement uint8, container interface{}, msg ...interface{}) bool
ContainsUint8 tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uint8`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func ContainsUintptr ¶
func ContainsUintptr(t testing.T, expectedElement uintptr, container interface{}, msg ...interface{}) bool
ContainsUintptr tests if `expectedElement` is contained within `container`. `container` can be a string, map (only keys are matched), array or slice. The `container` must have elements of type `uintptr`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `Contains` for more static typing. See also `NotContains`.
func DeepEqual ¶
DeepEqual tests if `left` == `right` using `reflect.DeepEqual`. msg is an optional list of arguments following the `fmt.Printf()` format. This is a deep, recursive equality test. See also `Equal`.
func Empty ¶
Empty tests if the passed value is Empty. A nil container or a container with zero elements are both empty. Uses Go len(). Container can be any of Array, Chan, Map, Slice, or String. msg is an optional list of arguments following the `fmt.Printf()` format. See also `Nil`.
func Equal ¶
Equal tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two interface{}. This is a strict equality test. It will fail if `left` and `right` have different types. For example, int32(42) is not equal to int64(42). You can use the typed versions of `Equal` for more static typing. Note that Slice, map, and function values are not comparable. See also `DeepEqual`.
func EqualBool ¶
EqualBool tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two bool.
func EqualByte ¶
EqualByte tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two byte.
func EqualComplex128 ¶
func EqualComplex128(t testing.T, left complex128, right complex128, msg ...interface{}) bool
EqualComplex128 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two complex128.
func EqualComplex64 ¶
EqualComplex64 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two complex64.
func EqualError ¶
EqualError tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two error.
func EqualFloat32 ¶
EqualFloat32 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two float32.
func EqualFloat64 ¶
EqualFloat64 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two float64.
func EqualInt ¶
EqualInt tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int.
func EqualInt16 ¶
EqualInt16 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int16.
func EqualInt32 ¶
EqualInt32 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int32.
func EqualInt64 ¶
EqualInt64 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int64.
func EqualInt8 ¶
EqualInt8 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int8.
func EqualRune ¶
EqualRune tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two rune.
func EqualString ¶
EqualString tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two string.
func EqualTypes ¶
EqualTypes tests if `left` and `right` have the same type. msg is an optional list of arguments following the `fmt.Printf()` format. Example:
var a int32 = 42; EqualType(t, int32(0), a)
func EqualUint ¶
EqualUint tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint.
func EqualUint16 ¶
EqualUint16 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint16.
func EqualUint32 ¶
EqualUint32 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint32.
func EqualUint64 ¶
EqualUint64 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint64.
func EqualUint8 ¶
EqualUint8 tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint8.
func EqualUintptr ¶
EqualUintptr tests if `left` is equal to `right` using the `==` operator. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uintptr.
func Failed ¶
Failed logs a message and fails the test. fmtstr and args follows the `fmt.Printf()` format.
func False ¶
False tests if val is False. msg is an optional list of arguments following the `fmt.Printf()` format.
func Nil ¶
Nil tests if the passed value is Nil. See also Empty. msg is an optional list of arguments following the `fmt.Printf()` format.
func NotContains ¶
func NotContains(t testing.T, expectedElement interface{}, container interface{}, msg ...interface{}) bool
NotContains tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The type of elements within `container` must match the type of `expectedElement`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsBool ¶
func NotContainsBool(t testing.T, expectedElement bool, container interface{}, msg ...interface{}) bool
NotContainsBool tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `bool`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsByte ¶
func NotContainsByte(t testing.T, expectedElement byte, container interface{}, msg ...interface{}) bool
NotContainsByte tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `byte`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsComplex128 ¶
func NotContainsComplex128(t testing.T, expectedElement complex128, container interface{}, msg ...interface{}) bool
NotContainsComplex128 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `complex128`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsComplex64 ¶
func NotContainsComplex64(t testing.T, expectedElement complex64, container interface{}, msg ...interface{}) bool
NotContainsComplex64 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `complex64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsError ¶
func NotContainsError(t testing.T, expectedElement error, container interface{}, msg ...interface{}) bool
NotContainsError tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `error`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsFloat32 ¶
func NotContainsFloat32(t testing.T, expectedElement float32, container interface{}, msg ...interface{}) bool
NotContainsFloat32 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `float32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsFloat64 ¶
func NotContainsFloat64(t testing.T, expectedElement float64, container interface{}, msg ...interface{}) bool
NotContainsFloat64 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `float64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsInt ¶
func NotContainsInt(t testing.T, expectedElement int, container interface{}, msg ...interface{}) bool
NotContainsInt tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `int`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsInt16 ¶
func NotContainsInt16(t testing.T, expectedElement int16, container interface{}, msg ...interface{}) bool
NotContainsInt16 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `int16`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsInt32 ¶
func NotContainsInt32(t testing.T, expectedElement int32, container interface{}, msg ...interface{}) bool
NotContainsInt32 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `int32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsInt64 ¶
func NotContainsInt64(t testing.T, expectedElement int64, container interface{}, msg ...interface{}) bool
NotContainsInt64 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `int64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsInt8 ¶
func NotContainsInt8(t testing.T, expectedElement int8, container interface{}, msg ...interface{}) bool
NotContainsInt8 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `int8`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsRune ¶
func NotContainsRune(t testing.T, expectedElement rune, container interface{}, msg ...interface{}) bool
NotContainsRune tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `rune`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsString ¶
func NotContainsString(t testing.T, expectedElement string, container interface{}, msg ...interface{}) bool
NotContainsString tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `string`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUint ¶
func NotContainsUint(t testing.T, expectedElement uint, container interface{}, msg ...interface{}) bool
NotContainsUint tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uint`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUint16 ¶
func NotContainsUint16(t testing.T, expectedElement uint16, container interface{}, msg ...interface{}) bool
NotContainsUint16 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uint16`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUint32 ¶
func NotContainsUint32(t testing.T, expectedElement uint32, container interface{}, msg ...interface{}) bool
NotContainsUint32 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uint32`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUint64 ¶
func NotContainsUint64(t testing.T, expectedElement uint64, container interface{}, msg ...interface{}) bool
NotContainsUint64 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uint64`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUint8 ¶
func NotContainsUint8(t testing.T, expectedElement uint8, container interface{}, msg ...interface{}) bool
NotContainsUint8 tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uint8`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotContainsUintptr ¶
func NotContainsUintptr(t testing.T, expectedElement uintptr, container interface{}, msg ...interface{}) bool
NotContainsUintptr tests if `expectedElement` is contained within `container`. `container` can be a string, map, array or slice. The `container` must have elements of type `uintptr`. msg is an optional list of arguments following the `fmt.Printf()` format. You can use the typed versions of `NotContains` for more static typing. See also `Contains`.
func NotDeepEqual ¶
NotDeepEqual tests if `left` != `right` using `reflect.DeepEqual`. msg is an optional list of arguments following the `fmt.Printf()` format. This is a deep, recursive non-equality test. See also `NotEqual`.
func NotEmpty ¶
NotEmpty tests if the passed value is not Empty. Only a non-nil container with at least one element will pass the test. Uses Go len(). Container can be any of Array, Chan, Map, Slice, or String. See also `NotNil`. msg is an optional list of arguments following the `fmt.Printf()` format.
func NotEqual ¶
NotEqual tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two interface{} This is a strict non-equality test. It will pass only when `left` and `right` have identical type but non-equal values. For example, given int32(42) and int64(42), the test will fail because the types are not comparable. Given int32(42) and int32(42), the test will fail because the two values are equal. You can use the typed versions of `NotEqual` for more static typing. Note that Slice, map, and function values are not comparable. See also `NotDeepEqual`.
func NotEqualBool ¶
NotEqualBool tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two bool
func NotEqualByte ¶
NotEqualByte tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two byte
func NotEqualComplex128 ¶
func NotEqualComplex128(t testing.T, left complex128, right complex128, msg ...interface{}) bool
NotEqualComplex128 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two complex128
func NotEqualComplex64 ¶
NotEqualComplex64 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two complex64
func NotEqualError ¶
NotEqualError tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two error
func NotEqualFloat32 ¶
NotEqualFloat32 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two float32
func NotEqualFloat64 ¶
NotEqualFloat64 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two float64
func NotEqualInt ¶
NotEqualInt tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int
func NotEqualInt16 ¶
NotEqualInt16 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int16
func NotEqualInt32 ¶
NotEqualInt32 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int32
func NotEqualInt64 ¶
NotEqualInt64 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int64
func NotEqualInt8 ¶
NotEqualInt8 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two int8
func NotEqualRune ¶
NotEqualRune tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two rune
func NotEqualString ¶
NotEqualString tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two string
func NotEqualTypes ¶
NotEqualTypes tests if `left` and `right` have different types. msg is an optional list of arguments following the `fmt.Printf()` format. Example:
var a int32 = 42; NotEqualType(t, int64(0), a)
func NotEqualUint ¶
NotEqualUint tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint
func NotEqualUint16 ¶
NotEqualUint16 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint16
func NotEqualUint32 ¶
NotEqualUint32 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint32
func NotEqualUint64 ¶
NotEqualUint64 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint64
func NotEqualUint8 ¶
NotEqualUint8 tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uint8
func NotEqualUintptr ¶
NotEqualUintptr tests if `left` is not equal to `right` using the `!=` operator. The left value comes first, followed by the value to test against. msg is an optional list of arguments following the `fmt.Printf()` format. This version takes takes two uintptr
func NotNil ¶
NotNil tests if the passed value is not Nil. See also NotEmpty. msg is an optional list of arguments following the `fmt.Printf()` format.
func Panics ¶
Panics asserts that the code inside the specified function f panics.
assert.Panics(t, func(){ GoCrazy() })
func PanicsWith ¶
PanicsWith asserts that the code inside the specified function f panics, and that the recovered panic value equals the expected panic value
assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
Types ¶
This section is empty.