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 CheckStringEqualIgnoreCase(t *testing.T, expected, actual string, options ...interface{})
- func CheckStringEqualTrimmed(t *testing.T, expected, actual string, options ...interface{})
- type CheckStringFlag
- type StringCompareFunc
Constants ¶
const ( VersionMajor int16 = 0 VersionMinor int16 = 1 VersionPatch int16 = 1 Version int64 = (int64(VersionMajor) << 48) + (int64(VersionMinor) << 32) + (int64(VersionPatch) << 16) VersionRevision int16 = VersionPatch )
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, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison.
func CheckStringEqualAny ¶
CheckStringEqualAny() evaluates a string value against an array of expected string values, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison
func CheckStringEqualIgnoreCase ¶
CheckStringEqualIgnoreCase() evaluates two strings, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equalitycomparison via the strings.EqualFold() standard library function.
func CheckStringEqualTrimmed ¶
CheckStringEqualTrimmed() evaluates two strings, calling testing.T.Errorf() if the evaluation fails. The evaluation is done by equality comparison after whitespace-trimming the actual value.
Types ¶
type CheckStringFlag ¶
type CheckStringFlag int