mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05:00
Merge pull request #27 from harshavardhana/pr_out_use_deepequals_instead_of_bytes_compare
Use DeepEquals instead of bytes Compare
This commit is contained in:
commit
084d029b54
@ -17,7 +17,6 @@
|
|||||||
package erasure
|
package erasure
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
. "gopkg.in/check.v1"
|
. "gopkg.in/check.v1"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -55,7 +54,5 @@ func (s *MySuite) TestCauchyDecode(c *C) {
|
|||||||
recovered_data, err := p.Decode(chunks, length)
|
recovered_data, err := p.Decode(chunks, length)
|
||||||
c.Assert(err, Not(IsNil))
|
c.Assert(err, Not(IsNil))
|
||||||
|
|
||||||
if i := bytes.Compare(recovered_data, data); i < 0 {
|
c.Assert(recovered_data, DeepEquals, data)
|
||||||
c.Fatalf("Error: recovered data is less than original data")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
package erasure
|
package erasure
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
. "gopkg.in/check.v1"
|
. "gopkg.in/check.v1"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -52,7 +51,5 @@ func (s *MySuite) TestVanderMondeDecode(c *C) {
|
|||||||
recovered_data, err := p.Decode(chunks, length)
|
recovered_data, err := p.Decode(chunks, length)
|
||||||
c.Assert(err, Not(IsNil))
|
c.Assert(err, Not(IsNil))
|
||||||
|
|
||||||
if i := bytes.Compare(recovered_data, data); i < 0 {
|
c.Assert(recovered_data, DeepEquals, data)
|
||||||
c.Fatalf("Error: recovered data is less than original data")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user