aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go')
-rw-r--r--vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go52
1 files changed, 0 insertions, 52 deletions
diff --git a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go
deleted file mode 100644
index 541c1b9..0000000
--- a/vendor/github.com/onsi/gomega/matchers/be_empty_matcher_test.go
+++ /dev/null
@@ -1,52 +0,0 @@
-package matchers_test
-
-import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
- . "github.com/onsi/gomega/matchers"
-)
-
-var _ = Describe("BeEmpty", func() {
- Context("when passed a supported type", func() {
- It("should do the right thing", func() {
- Ω("").Should(BeEmpty())
- Ω(" ").ShouldNot(BeEmpty())
-
- Ω([0]int{}).Should(BeEmpty())
- Ω([1]int{1}).ShouldNot(BeEmpty())
-
- Ω([]int{}).Should(BeEmpty())
- Ω([]int{1}).ShouldNot(BeEmpty())
-
- Ω(map[string]int{}).Should(BeEmpty())
- Ω(map[string]int{"a": 1}).ShouldNot(BeEmpty())
-
- c := make(chan bool, 1)
- Ω(c).Should(BeEmpty())
- c <- true
- Ω(c).ShouldNot(BeEmpty())
- })
- })
-
- Context("when passed a correctly typed nil", func() {
- It("should be true", func() {
- var nilSlice []int
- Ω(nilSlice).Should(BeEmpty())
-
- var nilMap map[int]string
- Ω(nilMap).Should(BeEmpty())
- })
- })
-
- Context("when passed an unsupported type", func() {
- It("should error", func() {
- success, err := (&BeEmptyMatcher{}).Match(0)
- Ω(success).Should(BeFalse())
- Ω(err).Should(HaveOccurred())
-
- success, err = (&BeEmptyMatcher{}).Match(nil)
- Ω(success).Should(BeFalse())
- Ω(err).Should(HaveOccurred())
- })
- })
-})