コード例 #1
0
ファイル: quantity.go プロジェクト: Trozz/advanced-ssh-config
// ShouldBeGreaterThan receives exactly two parameters and ensures that the first is greater than the second.
func ShouldBeGreaterThan(actual interface{}, expected ...interface{}) string {
	if fail := need(1, expected); fail != success {
		return fail
	}

	if matchError := oglematchers.GreaterThan(expected[0]).Matches(actual); matchError != nil {
		return fmt.Sprintf(shouldHaveBeenGreater, actual, expected[0])
	}
	return success
}
コード例 #2
0
// ExpectGt(x, y) is equivalent to ExpectThat(x, oglematchers.GreaterThan(y)).
func ExpectGt(x, y interface{}, errorParts ...interface{}) {
	expectThat(x, oglematchers.GreaterThan(y), 1, errorParts)
}
コード例 #3
0
// AssertGt(x, y) is equivalent to AssertThat(x, oglematchers.GreaterThan(y)).
func AssertGt(x, y interface{}, errorParts ...interface{}) {
	assertThat(x, oglematchers.GreaterThan(y), 1, errorParts)
}