Ejemplo n.º 1
0
// ShouldBeGreaterThanOrEqualTo receives exactly two parameters and ensures that the first is greater than or equal to the second.
func ShouldBeGreaterThanOrEqualTo(actual interface{}, expected ...interface{}) string {
	if fail := need(1, expected); fail != success {
		return fail
	} else if matchError := oglematchers.GreaterOrEqual(expected[0]).Matches(actual); matchError != nil {
		return fmt.Sprintf(shouldHaveBeenGreaterOrEqual, actual, expected[0])
	}
	return success
}
Ejemplo n.º 2
0
// AssertGe(x, y) is equivalent to
// AssertThat(x, oglematchers.GreaterOrEqual(y)).
func AssertGe(x, y interface{}, errorParts ...interface{}) {
	assertThat(x, oglematchers.GreaterOrEqual(y), 1, errorParts)
}
Ejemplo n.º 3
0
// ExpectGe(x, y) is equivalent to
// ExpectThat(x, oglematchers.GreaterOrEqual(y)).
func ExpectGe(x, y interface{}, errorParts ...interface{}) {
	expectThat(x, oglematchers.GreaterOrEqual(y), 1, errorParts)
}