From 22853ed1d9652b333dc44dd5411df60844a6a3ec Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Mon, 17 Nov 2014 00:06:42 -0800 Subject: [PATCH] Use DeepEquals instead of bytes Compare --- erasure/cauchy_test.go | 5 +---- erasure/vandermonde_test.go | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/erasure/cauchy_test.go b/erasure/cauchy_test.go index dc7475b6b..8b3dd481c 100644 --- a/erasure/cauchy_test.go +++ b/erasure/cauchy_test.go @@ -17,7 +17,6 @@ package erasure import ( - "bytes" . "gopkg.in/check.v1" "testing" ) @@ -55,7 +54,5 @@ func (s *MySuite) TestCauchyDecode(c *C) { recovered_data, err := p.Decode(chunks, length) c.Assert(err, Not(IsNil)) - if i := bytes.Compare(recovered_data, data); i < 0 { - c.Fatalf("Error: recovered data is less than original data") - } + c.Assert(recovered_data, DeepEquals, data) } diff --git a/erasure/vandermonde_test.go b/erasure/vandermonde_test.go index 4e082ad35..4a67f0164 100644 --- a/erasure/vandermonde_test.go +++ b/erasure/vandermonde_test.go @@ -17,7 +17,6 @@ package erasure import ( - "bytes" . "gopkg.in/check.v1" ) @@ -52,7 +51,5 @@ func (s *MySuite) TestVanderMondeDecode(c *C) { recovered_data, err := p.Decode(chunks, length) c.Assert(err, Not(IsNil)) - if i := bytes.Compare(recovered_data, data); i < 0 { - c.Fatalf("Error: recovered data is less than original data") - } + c.Assert(recovered_data, DeepEquals, data) }