4 . "github.com/onsi/ginkgo"
5 . "github.com/onsi/gomega"
8 var _ = Describe("BeZero", func() {
9 It("should succeed if the passed in object is the zero value for its type", func() {
10 Ω(nil).Should(BeZero())
12 Ω("").Should(BeZero())
13 Ω(" ").ShouldNot(BeZero())
16 Ω(1).ShouldNot(BeZero())
18 Ω(0.0).Should(BeZero())
19 Ω(0.1).ShouldNot(BeZero())
21 // Ω([]int{}).Should(BeZero())
22 Ω([]int{1}).ShouldNot(BeZero())
24 // Ω(map[string]int{}).Should(BeZero())
25 Ω(map[string]int{"a": 1}).ShouldNot(BeZero())
27 Ω(myCustomType{}).Should(BeZero())
28 Ω(myCustomType{s: "a"}).ShouldNot(BeZero())