Documentation ¶
Overview ¶
Extensions to the go-check unittest framework.
NOTE: see https://github.com/go-check/check/pull/6 for reasons why these checkers live here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BytesEquals = &bytesEquals{}
BytesEquals checker compares two bytes sequence using bytes.Equal.
For example:
c.Assert(b, BytesEquals, []byte("bar"))
Main difference between DeepEquals and BytesEquals is that BytesEquals treats `nil` as empty byte sequence while DeepEquals doesn't.
c.Assert(nil, BytesEquals, []byte("")) // succeeds c.Assert(nil, DeepEquals, []byte("")) // fails
View Source
var HasKey = &hasKey{}
The HasKey checker verifies that the obtained map contains the given key.
For example:
c.Assert(myMap, HasKey, "foo")
View Source
var IsFalse Checker = &isBoolValueChecker{ &CheckerInfo{Name: "IsFalse", Params: []string{"obtained"}}, false, }
The IsFalse checker verifies that the obtained value is false.
For example:
c.Assert(value, IsFalse)
View Source
var IsTrue Checker = &isBoolValueChecker{ &CheckerInfo{Name: "IsTrue", Params: []string{"obtained"}}, true, }
The IsTrue checker verifies that the obtained value is true.
For example:
c.Assert(value, IsTrue)
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.