Documentation ¶
Index ¶
- func Fail(msg string, args ...interface{})
- func RegisterT(t *testing.T)
- type AnyAssertions
- func (a *AnyAssertions) ContainsSubstring(substr string) bool
- func (a *AnyAssertions) Equals(expected interface{}) bool
- func (a *AnyAssertions) EventuallyEquals(expected interface{}) bool
- func (a *AnyAssertions) HasLen(expected int) bool
- func (a *AnyAssertions) IsEmpty() bool
- func (a *AnyAssertions) IsFalse() bool
- func (a *AnyAssertions) IsNil() bool
- func (a *AnyAssertions) IsNotEmpty() bool
- func (a *AnyAssertions) IsNotNil() bool
- func (a *AnyAssertions) IsTrue() bool
- func (a *AnyAssertions) NotEquals(other interface{}) bool
- func (a *AnyAssertions) Panics() (panicked bool)
- func (a *AnyAssertions) TemporarilySimilar(other time.Time, diff time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AnyAssertions ¶
type AnyAssertions struct {
// contains filtered or unexported fields
}
AnyAssertions is used to assert any kind of value
func Expect ¶
func Expect(actual interface{}) *AnyAssertions
Expect starts new assertions on given value
func (*AnyAssertions) ContainsSubstring ¶
func (a *AnyAssertions) ContainsSubstring(substr string) bool
ContainsSubstring asserts that actual value contains given substring
func (*AnyAssertions) Equals ¶
func (a *AnyAssertions) Equals(expected interface{}) bool
Equals asserts that actual value equals expected value
func (*AnyAssertions) EventuallyEquals ¶
func (a *AnyAssertions) EventuallyEquals(expected interface{}) bool
EventuallyEquals asserts that, within 30 seconds, the actual function will return same value as expected value
func (*AnyAssertions) HasLen ¶
func (a *AnyAssertions) HasLen(expected int) bool
HasLen asserts that actual value has an expected length
func (*AnyAssertions) IsEmpty ¶
func (a *AnyAssertions) IsEmpty() bool
IsEmpty asserts that actual value is empty
func (*AnyAssertions) IsFalse ¶
func (a *AnyAssertions) IsFalse() bool
IsFalse asserts that actual value is false
func (*AnyAssertions) IsNil ¶
func (a *AnyAssertions) IsNil() bool
IsNil asserts that actual value is nil
func (*AnyAssertions) IsNotEmpty ¶
func (a *AnyAssertions) IsNotEmpty() bool
IsNotEmpty asserts that actual value is not empty
func (*AnyAssertions) IsNotNil ¶
func (a *AnyAssertions) IsNotNil() bool
IsNotNil asserts that actual value is not nil
func (*AnyAssertions) IsTrue ¶
func (a *AnyAssertions) IsTrue() bool
IsTrue asserts that actual value is true
func (*AnyAssertions) NotEquals ¶
func (a *AnyAssertions) NotEquals(other interface{}) bool
NotEquals asserts that actual value is different than given value
func (*AnyAssertions) Panics ¶
func (a *AnyAssertions) Panics() (panicked bool)
Panics asserts that actual value panics whenever called
func (*AnyAssertions) TemporarilySimilar ¶
TemporarilySimilar asserts that actual value is between a range of other time value