assert

package
v2.33.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 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

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

func (*AddressSubject) Equals

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

func (*AddressSubject) EqualsString

func (subject *AddressSubject) EqualsString(another string)

func (*AddressSubject) IsDomain

func (subject *AddressSubject) IsDomain()

func (*AddressSubject) IsIPv4

func (subject *AddressSubject) IsIPv4()

func (*AddressSubject) IsIPv6

func (subject *AddressSubject) IsIPv6()

func (*AddressSubject) IsNotDomain

func (subject *AddressSubject) IsNotDomain()

func (*AddressSubject) IsNotIPv4

func (subject *AddressSubject) IsNotIPv4()

func (*AddressSubject) IsNotIPv6

func (subject *AddressSubject) IsNotIPv6()

func (*AddressSubject) NotEquals

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

func (*AddressSubject) NotEqualsString

func (subject *AddressSubject) NotEqualsString(another string)

type Assert

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

func On

func On(t *testing.T) *Assert

func (*Assert) Address

func (v *Assert) Address(value net.Address) *AddressSubject

func (*Assert) Bool

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

Assert on a boolean variable.

func (*Assert) Byte

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

func (*Assert) Bytes

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

func (*Assert) Destination

func (v *Assert) Destination(value net.Destination) *DestinationSubject

func (*Assert) Error

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

func (*Assert) Fail

func (v *Assert) Fail(message string)

func (*Assert) IP

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

func (*Assert) Int

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

func (*Assert) Int64

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

func (*Assert) Pointer

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

func (*Assert) Port

func (v *Assert) Port(value net.Port) *PortSubject

func (*Assert) String

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

func (*Assert) Uint16

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

func (*Assert) Uint32

func (v *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

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

type DestinationSubject

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

func (*DestinationSubject) Equals

func (v *DestinationSubject) Equals(another net.Destination)

func (*DestinationSubject) EqualsString

func (v *DestinationSubject) EqualsString(another string)

func (*DestinationSubject) HasAddress

func (v *DestinationSubject) HasAddress() *AddressSubject

func (*DestinationSubject) HasPort

func (v *DestinationSubject) HasPort() *PortSubject

func (*DestinationSubject) IsNotTCP

func (v *DestinationSubject) IsNotTCP()

func (*DestinationSubject) IsNotUDP

func (v *DestinationSubject) IsNotUDP()

func (*DestinationSubject) IsTCP

func (v *DestinationSubject) IsTCP()

func (*DestinationSubject) IsUDP

func (v *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

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

func (*IPSubject) Equals

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

func (*IPSubject) IsNil

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

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

func (*PortSubject) Equals

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

func (*PortSubject) GreaterThan

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

func (*PortSubject) IsValid

func (subject *PortSubject) IsValid()

func (*PortSubject) LessThan

func (subject *PortSubject) LessThan(expectation net.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) IsEmpty

func (subject *StringSubject) IsEmpty()

func (*StringSubject) NotContains

func (subject *StringSubject) NotContains(substring string)

func (*StringSubject) NotEquals

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

func (subject *Uint16Subject) IsNegative()

func (*Uint16Subject) IsPositive

func (subject *Uint16Subject) IsPositive()

func (*Uint16Subject) LessThan

func (subject *Uint16Subject) LessThan(expectation uint16)

type Uint32Subject

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

func (*Uint32Subject) Equals

func (subject *Uint32Subject) Equals(expectation uint32)

func (*Uint32Subject) GreaterThan

func (subject *Uint32Subject) GreaterThan(expectation uint32)

func (*Uint32Subject) IsNegative

func (subject *Uint32Subject) IsNegative()

func (*Uint32Subject) IsPositive

func (subject *Uint32Subject) IsPositive()

func (*Uint32Subject) LessThan

func (subject *Uint32Subject) LessThan(expectation uint32)

Jump to

Keyboard shortcuts

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