aboutsummaryrefslogtreecommitdiffstats
path: root/internal/hash_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-10-27 01:49:58 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2015-10-27 01:49:58 +0100
commit7d6c5a56c0b63705378f125523876de1a97fd1ce (patch)
tree8945a8a02d53f36a64304beaf006c4f46d61da48 /internal/hash_test.go
parenta2e49a59782a50a9ff116c6d17c6e3888502f2ad (diff)
downloadgo-git-7d6c5a56c0b63705378f125523876de1a97fd1ce.tar.gz
tree and commit
Diffstat (limited to 'internal/hash_test.go')
-rw-r--r--internal/hash_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/hash_test.go b/internal/hash_test.go
index 222f3b4..063bd23 100644
--- a/internal/hash_test.go
+++ b/internal/hash_test.go
@@ -25,3 +25,11 @@ func (s *HashSuite) TestNewHash(c *C) {
c.Assert(hash, Equals, NewHash(hash.String()))
}
+
+func (s *HashSuite) TestIsZero(c *C) {
+ hash := NewHash("foo")
+ c.Assert(hash.IsZero(), Equals, true)
+
+ hash = NewHash("8ab686eafeb1f44702738c8b0f24f2567c36da6d")
+ c.Assert(hash.IsZero(), Equals, false)
+}