mirror of
https://github.com/containers/podman.git
synced 2025-12-03 19:59:39 +08:00
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.5.0 to 1.7.0. - [Release notes](https://github.com/onsi/gomega/releases) - [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md) - [Commits](https://github.com/onsi/gomega/compare/v1.5.0...v1.7.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
29 lines
627 B
Go
29 lines
627 B
Go
// untested sections: 2
|
|
|
|
package matchers
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/onsi/gomega/format"
|
|
)
|
|
|
|
type BeTrueMatcher struct {
|
|
}
|
|
|
|
func (matcher *BeTrueMatcher) Match(actual interface{}) (success bool, err error) {
|
|
if !isBool(actual) {
|
|
return false, fmt.Errorf("Expected a boolean. Got:\n%s", format.Object(actual, 1))
|
|
}
|
|
|
|
return actual.(bool), nil
|
|
}
|
|
|
|
func (matcher *BeTrueMatcher) FailureMessage(actual interface{}) (message string) {
|
|
return format.Message(actual, "to be true")
|
|
}
|
|
|
|
func (matcher *BeTrueMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
|
return format.Message(actual, "not to be true")
|
|
}
|