Documentation
¶
Index ¶
- Constants
- func CheckStringByStringMatch(t *testing.T, pattern string, actual string, options ...interface{})
- func CheckStringCompare(t *testing.T, expected, actual string, fn StringCompareFunc, ...)
- func CheckStringEqual(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringEqualAny(t *testing.T, expecteds []string, actual string, options ...interface{})
- func CheckStringEqualChomped(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringEqualIgnoreCase(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringEqualTrimmed(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringNotEqual(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringNotEqualChomped(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringNotEqualIgnoreCase(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringNotEqualTrimmed(t *testing.T, expected, actual string, options ...interface{})
- func VersionString() string
- type CheckStringFlag
- type StringCompareFunc
Constants ¶
const ( VersionMajor uint16 = 0 VersionMinor uint16 = 2 VersionPatch uint16 = 2 VersionAB uint16 = 0xFFFF Version uint64 = (uint64(VersionMajor) << 48) + (uint64(VersionMinor) << 32) + (uint64(VersionPatch) << 16) + (uint64(VersionAB) << 0) )
const (
CheckStringFlag_None = 1 << iota
)
Variables ¶
This section is empty.
Functions ¶
func CheckStringCompare ¶
func CheckStringCompare(t *testing.T, expected, actual string, fn StringCompareFunc, comparison_type string, options ...interface{})
CheckStringCompare() evaluates two strings, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by the given caller-supplied comparison function, whose brief descriptor comparison_type, e.g. "regular expression" will be prefixed with the string "when compared by ".
func CheckStringEqual ¶
CheckStringEqual() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison.
func CheckStringEqualAny ¶
CheckStringEqualAny() evaluates a string for equality against an array of string values, calling testing.T.Errorf() if every evaluation fails. Each evaluation is done by equality comparison.
func CheckStringEqualChomped ¶ added in v0.2.0
CheckStringEqualChomped() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after chomping the actual value.
func CheckStringEqualIgnoreCase ¶
CheckStringEqualIgnoreCase() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison ignoring the case of the strings, via the strings.EqualFold() standard library function.
func CheckStringEqualTrimmed ¶
CheckStringEqualTrimmed() evaluates two strings for equality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after whitespace-trimming the actual value.
func CheckStringNotEqual ¶ added in v0.2.0
CheckStringNotEqual() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison.
func CheckStringNotEqualChomped ¶ added in v0.2.0
CheckStringNotEqualChomped() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after chomping the actual value.
func CheckStringNotEqualIgnoreCase ¶ added in v0.2.0
CheckStringEqualIgnoreCase() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison ignoring the case of the strings, via the strings.EqualFold() standard library function.
func CheckStringNotEqualTrimmed ¶ added in v0.2.0
CheckStringNotEqualTrimmed() evaluates two strings for inequality, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after whitespace-trimming the actual value.
func VersionString ¶ added in v0.2.2
func VersionString() string
Types ¶
type CheckStringFlag ¶
type CheckStringFlag int