assert

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressSubject added in v1.17.1

type AddressSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*AddressSubject) Equals added in v1.17.1

func (subject *AddressSubject) Equals(another v2net.Address)

func (*AddressSubject) EqualsString added in v1.17.1

func (subject *AddressSubject) EqualsString(another string)

func (*AddressSubject) IsDomain added in v1.17.1

func (subject *AddressSubject) IsDomain()

func (*AddressSubject) IsIPv4 added in v1.17.1

func (subject *AddressSubject) IsIPv4()

func (*AddressSubject) IsIPv6 added in v1.17.1

func (subject *AddressSubject) IsIPv6()

func (*AddressSubject) IsNotDomain added in v1.17.1

func (subject *AddressSubject) IsNotDomain()

func (*AddressSubject) IsNotIPv4 added in v1.17.1

func (subject *AddressSubject) IsNotIPv4()

func (*AddressSubject) IsNotIPv6 added in v1.17.1

func (subject *AddressSubject) IsNotIPv6()

func (*AddressSubject) NotEquals added in v1.17.1

func (subject *AddressSubject) NotEquals(another v2net.Address)

func (*AddressSubject) NotEqualsString added in v1.17.1

func (subject *AddressSubject) NotEqualsString(another string)

type Assert added in v1.17.1

type Assert struct {
	// contains filtered or unexported fields
}

func On added in v1.17.1

func On(t *testing.T) *Assert

func (*Assert) Address added in v1.17.1

func (this *Assert) Address(value v2net.Address) *AddressSubject

func (*Assert) Bool added in v1.17.1

func (this *Assert) Bool(value bool) *BoolSubject

Assert on a boolean variable.

func (*Assert) Byte added in v1.17.1

func (this *Assert) Byte(value byte) *ByteSubject

func (*Assert) Bytes added in v1.17.1

func (this *Assert) Bytes(value []byte) *BytesSubject

func (*Assert) Destination added in v1.17.1

func (this *Assert) Destination(value v2net.Destination) *DestinationSubject

func (*Assert) Error added in v1.17.1

func (this *Assert) Error(value error) *ErrorSubject

func (*Assert) Fail added in v1.17.1

func (this *Assert) Fail(message string)

func (*Assert) IP added in v1.17.1

func (this *Assert) IP(value net.IP) *IPSubject

func (*Assert) Int added in v1.17.1

func (this *Assert) Int(value int) *IntSubject

func (*Assert) Int64 added in v1.17.1

func (this *Assert) Int64(value int64) *Int64Subject

func (*Assert) Pointer added in v1.17.1

func (this *Assert) Pointer(value interface{}) *PointerSubject

func (*Assert) Port added in v1.17.1

func (this *Assert) Port(value v2net.Port) *PortSubject

func (*Assert) String added in v1.17.1

func (this *Assert) String(value string) *StringSubject

func (*Assert) Uint16 added in v1.17.1

func (this *Assert) Uint16(value uint16) *Uint16Subject

func (*Assert) Uint32 added in v1.18.1

func (this *Assert) Uint32(value uint32) *Uint32Subject

type BoolSubject

type BoolSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*BoolSubject) Equals

func (subject *BoolSubject) Equals(expectation bool)

to be equal to another boolean variable.

func (*BoolSubject) IsFalse

func (subject *BoolSubject) IsFalse()

to be false.

func (*BoolSubject) IsTrue

func (subject *BoolSubject) IsTrue()

to be true.

type ByteSubject

type ByteSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*ByteSubject) Equals

func (subject *ByteSubject) Equals(expectation byte)

func (*ByteSubject) GreaterThan

func (subject *ByteSubject) GreaterThan(expectation byte)

func (*ByteSubject) LessThan

func (subject *ByteSubject) LessThan(expectation byte)

type BytesSubject

type BytesSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*BytesSubject) Equals

func (subject *BytesSubject) Equals(expectation []byte)

func (*BytesSubject) NotEquals added in v1.1.4

func (subject *BytesSubject) NotEquals(expectation []byte)

type DestinationSubject added in v1.17.1

type DestinationSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*DestinationSubject) EqualsString added in v1.17.1

func (this *DestinationSubject) EqualsString(another string)

func (*DestinationSubject) HasAddress added in v1.17.1

func (this *DestinationSubject) HasAddress() *AddressSubject

func (*DestinationSubject) HasPort added in v1.17.1

func (this *DestinationSubject) HasPort() *PortSubject

func (*DestinationSubject) IsNotTCP added in v1.17.1

func (this *DestinationSubject) IsNotTCP()

func (*DestinationSubject) IsNotUDP added in v1.17.1

func (this *DestinationSubject) IsNotUDP()

func (*DestinationSubject) IsTCP added in v1.17.1

func (this *DestinationSubject) IsTCP()

func (*DestinationSubject) IsUDP added in v1.17.1

func (this *DestinationSubject) IsUDP()

type ErrorSubject

type ErrorSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*ErrorSubject) Equals

func (subject *ErrorSubject) Equals(expectation error)

func (*ErrorSubject) IsNil

func (subject *ErrorSubject) IsNil()

func (*ErrorSubject) IsNotNil

func (subject *ErrorSubject) IsNotNil()

type IPSubject added in v1.17.1

type IPSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*IPSubject) Equals added in v1.17.1

func (subject *IPSubject) Equals(ip net.IP)

func (*IPSubject) IsNil added in v1.17.1

func (subject *IPSubject) IsNil()

type Int64Subject

type Int64Subject struct {
	Subject
	// contains filtered or unexported fields
}

func (*Int64Subject) AtLeast

func (subject *Int64Subject) AtLeast(expectation int64)

func (*Int64Subject) AtMost

func (subject *Int64Subject) AtMost(expectation int64)

func (*Int64Subject) Equals

func (subject *Int64Subject) Equals(expectation int64)

func (*Int64Subject) GreaterThan

func (subject *Int64Subject) GreaterThan(expectation int64)

type IntSubject

type IntSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*IntSubject) Equals

func (subject *IntSubject) Equals(expectation int)

func (*IntSubject) GreaterThan

func (subject *IntSubject) GreaterThan(expectation int)

func (*IntSubject) LessThan

func (subject *IntSubject) LessThan(expectation int)

type PointerSubject

type PointerSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*PointerSubject) Equals

func (subject *PointerSubject) Equals(expectation interface{})

func (*PointerSubject) IsNil

func (subject *PointerSubject) IsNil()

func (*PointerSubject) IsNotNil

func (subject *PointerSubject) IsNotNil()

type PortSubject added in v1.17.1

type PortSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*PortSubject) Equals added in v1.17.1

func (subject *PortSubject) Equals(expectation v2net.Port)

func (*PortSubject) GreaterThan added in v1.17.1

func (subject *PortSubject) GreaterThan(expectation v2net.Port)

func (*PortSubject) IsValid added in v1.17.1

func (subject *PortSubject) IsValid()

func (*PortSubject) LessThan added in v1.17.1

func (subject *PortSubject) LessThan(expectation v2net.Port)

type StringSubject

type StringSubject struct {
	Subject
	// contains filtered or unexported fields
}

func (*StringSubject) Contains

func (subject *StringSubject) Contains(substring string)

func (*StringSubject) Equals

func (subject *StringSubject) Equals(expectation string)

func (*StringSubject) NotContains

func (subject *StringSubject) NotContains(substring string)

func (*StringSubject) NotEquals added in v1.1.4

func (subject *StringSubject) NotEquals(expectation string)

type Subject

type Subject struct {
	// contains filtered or unexported fields
}

func (*Subject) DisplayString

func (subject *Subject) DisplayString() string

func (*Subject) Fail

func (subject *Subject) Fail(verb string, other string)

func (*Subject) FailWithMessage

func (subject *Subject) FailWithMessage(message string)

type Uint16Subject

type Uint16Subject struct {
	Subject
	// contains filtered or unexported fields
}

func (*Uint16Subject) Equals

func (subject *Uint16Subject) Equals(expectation uint16)

func (*Uint16Subject) GreaterThan

func (subject *Uint16Subject) GreaterThan(expectation uint16)

func (*Uint16Subject) IsNegative added in v1.17.1

func (subject *Uint16Subject) IsNegative()

func (*Uint16Subject) IsPositive added in v1.17.1

func (subject *Uint16Subject) IsPositive()

func (*Uint16Subject) LessThan

func (subject *Uint16Subject) LessThan(expectation uint16)

type Uint32Subject added in v1.18.1

type Uint32Subject struct {
	Subject
	// contains filtered or unexported fields
}

func (*Uint32Subject) Equals added in v1.18.1

func (subject *Uint32Subject) Equals(expectation uint32)

func (*Uint32Subject) GreaterThan added in v1.18.1

func (subject *Uint32Subject) GreaterThan(expectation uint32)

func (*Uint32Subject) IsNegative added in v1.18.1

func (subject *Uint32Subject) IsNegative()

func (*Uint32Subject) IsPositive added in v1.18.1

func (subject *Uint32Subject) IsPositive()

func (*Uint32Subject) LessThan added in v1.18.1

func (subject *Uint32Subject) LessThan(expectation uint32)

Jump to

Keyboard shortcuts

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