diff options
author | 2019-01-10 10:57:50 +0100 | |
---|---|---|
committer | 2019-01-10 11:05:35 +0100 | |
commit | 08266e35878f198e2fa59fcfc9f0fc3a4b1dfbf5 (patch) | |
tree | 1269acfc3bf6fdd47414eb64da3ecad4865e37d6 /vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go | |
parent | 3ef6f210edcf7dd753733d46ec3f2dd5dc795b61 (diff) |
Add support for string types
- strings are now generated as two fields for length and string itself
- aliases are now sorted by name to prevent generating different code
- dependencies are now managed by dep
- binapi files are regenerated using VPP 19.01-rc0~622-g7b01e9e8
- old stats binary api has been deprecated and removed from VPP
Change-Id: Ieb8515c73021339a45f407386f8e3d87dcf4469e
Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go')
-rw-r--r-- | vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go b/vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go deleted file mode 100644 index 8b90a1a..0000000 --- a/vendor/github.com/onsi/gomega/matchers/be_identical_to_test.go +++ /dev/null @@ -1,61 +0,0 @@ -package matchers_test - -import ( - "errors" - - . "github.com/onsi/ginkgo" - . "github.com/onsi/gomega" - . "github.com/onsi/gomega/matchers" -) - -var _ = Describe("BeIdenticalTo", func() { - Context("when asserting that nil equals nil", func() { - It("should error", func() { - success, err := (&BeIdenticalToMatcher{Expected: nil}).Match(nil) - - Ω(success).Should(BeFalse()) - Ω(err).Should(HaveOccurred()) - }) - }) - - It("should treat the same pointer to a struct as identical", func() { - mySpecialStruct := myCustomType{} - Ω(&mySpecialStruct).Should(BeIdenticalTo(&mySpecialStruct)) - Ω(&myCustomType{}).ShouldNot(BeIdenticalTo(&mySpecialStruct)) - }) - - It("should be strict about types", func() { - Ω(5).ShouldNot(BeIdenticalTo("5")) - Ω(5).ShouldNot(BeIdenticalTo(5.0)) - Ω(5).ShouldNot(BeIdenticalTo(3)) - }) - - It("should treat primtives as identical", func() { - Ω("5").Should(BeIdenticalTo("5")) - Ω("5").ShouldNot(BeIdenticalTo("55")) - - Ω(5.55).Should(BeIdenticalTo(5.55)) - Ω(5.55).ShouldNot(BeIdenticalTo(6.66)) - - Ω(5).Should(BeIdenticalTo(5)) - Ω(5).ShouldNot(BeIdenticalTo(55)) - }) - - It("should treat the same pointers to a slice as identical", func() { - mySlice := []int{1, 2} - Ω(&mySlice).Should(BeIdenticalTo(&mySlice)) - Ω(&mySlice).ShouldNot(BeIdenticalTo(&[]int{1, 2})) - }) - - It("should treat the same pointers to a map as identical", func() { - myMap := map[string]string{"a": "b", "c": "d"} - Ω(&myMap).Should(BeIdenticalTo(&myMap)) - Ω(myMap).ShouldNot(BeIdenticalTo(map[string]string{"a": "b", "c": "d"})) - }) - - It("should treat the same pointers to an error as identical", func() { - myError := errors.New("foo") - Ω(&myError).Should(BeIdenticalTo(&myError)) - Ω(errors.New("foo")).ShouldNot(BeIdenticalTo(errors.New("bar"))) - }) -}) |