mirror of
https://github.com/containers/podman.git
synced 2025-12-04 04:09:40 +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
635 B
Go
29 lines
635 B
Go
// untested sections: 2
|
|
|
|
package matchers
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/onsi/gomega/format"
|
|
)
|
|
|
|
type BeFalseMatcher struct {
|
|
}
|
|
|
|
func (matcher *BeFalseMatcher) 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 == false, nil
|
|
}
|
|
|
|
func (matcher *BeFalseMatcher) FailureMessage(actual interface{}) (message string) {
|
|
return format.Message(actual, "to be false")
|
|
}
|
|
|
|
func (matcher *BeFalseMatcher) NegatedFailureMessage(actual interface{}) (message string) {
|
|
return format.Message(actual, "not to be false")
|
|
}
|