assert

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolSubject

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

func Bool

func Bool(value bool) *BoolSubject

Assert on a boolean variable.

func (*BoolSubject) DisplayString

func (subject *BoolSubject) DisplayString() string

func (*BoolSubject) Equals

func (subject *BoolSubject) Equals(expectation bool)

to be equal to another boolean variable.

func (*BoolSubject) Fail

func (subject *BoolSubject) Fail(verb string, other bool)

func (*BoolSubject) IsFalse

func (subject *BoolSubject) IsFalse()

to be false.

func (*BoolSubject) IsTrue

func (subject *BoolSubject) IsTrue()

to be true.

func (*BoolSubject) Named

func (subject *BoolSubject) Named(name string) *BoolSubject

type ByteSubject

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

func Byte

func Byte(value byte) *ByteSubject

func (*ByteSubject) DisplayString

func (subject *ByteSubject) DisplayString() string

func (*ByteSubject) Equals

func (subject *ByteSubject) Equals(expectation byte)

func (*ByteSubject) Fail

func (subject *ByteSubject) Fail(verb string, other byte)

func (*ByteSubject) GreaterThan

func (subject *ByteSubject) GreaterThan(expectation byte)

func (*ByteSubject) LessThan

func (subject *ByteSubject) LessThan(expectation byte)

func (*ByteSubject) Named

func (subject *ByteSubject) Named(name string) *ByteSubject

type BytesSubject

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

func Bytes

func Bytes(value []byte) *BytesSubject

func (*BytesSubject) DisplayString

func (subject *BytesSubject) DisplayString() string

func (*BytesSubject) Equals

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

func (*BytesSubject) Fail

func (subject *BytesSubject) Fail(verb string, other []byte)

func (*BytesSubject) Named

func (subject *BytesSubject) Named(name string) *BytesSubject

type ErrorSubject

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

func Error

func Error(value error) *ErrorSubject

func (*ErrorSubject) DisplayString

func (subject *ErrorSubject) DisplayString() string

func (*ErrorSubject) Equals

func (subject *ErrorSubject) Equals(expectation error)

func (*ErrorSubject) Fail

func (subject *ErrorSubject) Fail(verb string, other error)

func (*ErrorSubject) IsNil

func (subject *ErrorSubject) IsNil()

func (*ErrorSubject) IsNotNil

func (subject *ErrorSubject) IsNotNil()

func (*ErrorSubject) Named

func (subject *ErrorSubject) Named(name string) *ErrorSubject

type Int64Subject

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

func Int64

func Int64(value int64) *Int64Subject

func (*Int64Subject) AtLeast

func (subject *Int64Subject) AtLeast(expectation int64)

func (*Int64Subject) AtMost

func (subject *Int64Subject) AtMost(expectation int64)

func (*Int64Subject) DisplayString

func (subject *Int64Subject) DisplayString() string

func (*Int64Subject) Equals

func (subject *Int64Subject) Equals(expectation int64)

func (*Int64Subject) Fail

func (subject *Int64Subject) Fail(verb string, other int64)

func (*Int64Subject) GreaterThan

func (subject *Int64Subject) GreaterThan(expectation int64)

func (*Int64Subject) Named

func (subject *Int64Subject) Named(name string) *Int64Subject

type IntSubject

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

func Int

func Int(value int) *IntSubject

func (*IntSubject) DisplayString

func (subject *IntSubject) DisplayString() string

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)

func (*IntSubject) Named

func (subject *IntSubject) Named(name string) *IntSubject

type PointerSubject

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

func Pointer

func Pointer(value interface{}) *PointerSubject

func (*PointerSubject) DisplayString

func (subject *PointerSubject) DisplayString() string

func (*PointerSubject) Equals

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

func (*PointerSubject) Fail

func (subject *PointerSubject) Fail(verb string, other interface{})

func (*PointerSubject) IsNil

func (subject *PointerSubject) IsNil()

func (*PointerSubject) IsNotNil

func (subject *PointerSubject) IsNotNil()

func (*PointerSubject) Named

func (subject *PointerSubject) Named(name string) *PointerSubject

type StringSubject

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

func String

func String(value serial.String) *StringSubject

func StringLiteral

func StringLiteral(value string) *StringSubject

func (*StringSubject) Contains

func (subject *StringSubject) Contains(substring serial.String)

func (*StringSubject) DisplayString

func (subject *StringSubject) DisplayString() string

func (*StringSubject) Equals

func (subject *StringSubject) Equals(expectation string)

func (*StringSubject) Named

func (subject *StringSubject) Named(name string) *StringSubject

func (*StringSubject) NotContains

func (subject *StringSubject) NotContains(substring serial.String)

type Subject

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

func NewSubject

func NewSubject() *Subject

func (*Subject) DisplayString

func (subject *Subject) DisplayString(value string) string

func (*Subject) Fail

func (subject *Subject) Fail(displayString string, verb string, other serial.String)

func (*Subject) FailWithMessage

func (subject *Subject) FailWithMessage(message string)

func (*Subject) Named

func (subject *Subject) Named(name string)

type Uint16Subject

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

func Uint16

func Uint16(value uint16) *Uint16Subject

func (*Uint16Subject) DisplayString

func (subject *Uint16Subject) DisplayString() string

func (*Uint16Subject) Equals

func (subject *Uint16Subject) Equals(expectation uint16)

func (*Uint16Subject) GreaterThan

func (subject *Uint16Subject) GreaterThan(expectation uint16)

func (*Uint16Subject) LessThan

func (subject *Uint16Subject) LessThan(expectation uint16)

func (*Uint16Subject) Named

func (subject *Uint16Subject) Named(name string) *Uint16Subject

func (*Uint16Subject) Positive

func (subject *Uint16Subject) Positive()

Jump to

Keyboard shortcuts

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