summaryrefslogtreecommitdiff
path: root/vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-24 16:52:02 +0200
committerGitHub <noreply@github.com>2019-06-24 16:52:02 +0200
commit72260a296c534950d9c899ee907e73b5dd0162f0 (patch)
treed9b33042a70c2d1e600c75855a29b3aa594aaab6 /vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go
parentcf244d87cdb9b2cb0d8510b2ea392d928c1eb269 (diff)
parentd697456dc90adbaf68224ed7c115b38d5855e582 (diff)
downloadpodman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.gz
podman-72260a296c534950d9c899ee907e73b5dd0162f0.tar.bz2
podman-72260a296c534950d9c899ee907e73b5dd0162f0.zip
Merge pull request #3414 from vrothberg/go-modules
Go modules
Diffstat (limited to 'vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go')
-rw-r--r--vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go b/vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go
deleted file mode 100644
index 8a61f2e2c..000000000
--- a/vendor/github.com/onsi/gomega/matchers/have_cap_matcher_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-package matchers_test
-
-import (
- . "github.com/onsi/ginkgo"
- . "github.com/onsi/gomega"
- . "github.com/onsi/gomega/matchers"
-)
-
-var _ = Describe("HaveCap", func() {
- Context("when passed a supported type", func() {
- It("should do the right thing", func() {
- Expect([0]int{}).Should(HaveCap(0))
- Expect([2]int{1}).Should(HaveCap(2))
-
- Expect([]int{}).Should(HaveCap(0))
- Expect([]int{1, 2, 3, 4, 5}[:2]).Should(HaveCap(5))
- Expect(make([]int, 0, 5)).Should(HaveCap(5))
-
- c := make(chan bool, 3)
- Expect(c).Should(HaveCap(3))
- c <- true
- c <- true
- Expect(c).Should(HaveCap(3))
-
- Expect(make(chan bool)).Should(HaveCap(0))
- })
- })
-
- Context("when passed a correctly typed nil", func() {
- It("should operate succesfully on the passed in value", func() {
- var nilSlice []int
- Expect(nilSlice).Should(HaveCap(0))
-
- var nilChan chan int
- Expect(nilChan).Should(HaveCap(0))
- })
- })
-
- Context("when passed an unsupported type", func() {
- It("should error", func() {
- success, err := (&HaveCapMatcher{Count: 0}).Match(0)
- Expect(success).Should(BeFalse())
- Expect(err).Should(HaveOccurred())
-
- success, err = (&HaveCapMatcher{Count: 0}).Match(nil)
- Expect(success).Should(BeFalse())
- Expect(err).Should(HaveOccurred())
- })
- })
-})