Commit 0bee44ab authored by Kejie Zhang's avatar Kejie Zhang

update test and fmt code

parent 56321ac9
...@@ -55,7 +55,7 @@ func parseRabinString(r io.Reader, chunker string) (Splitter, error) { ...@@ -55,7 +55,7 @@ func parseRabinString(r io.Reader, chunker string) (Splitter, error) {
return nil, err return nil, err
} }
if min < 16 { if min < 16 {
return nil,ErrRabinMin return nil, ErrRabinMin
} }
sub = strings.Split(parts[2], ":") sub = strings.Split(parts[2], ":")
if len(sub) > 1 && sub[0] != "avg" { if len(sub) > 1 && sub[0] != "avg" {
......
package chunk package chunk
import ( import (
"testing"
"bytes" "bytes"
"testing"
) )
func TestParse(t *testing.T) { func TestParse(t *testing.T) {
...@@ -15,7 +15,7 @@ func TestParse(t *testing.T) { ...@@ -15,7 +15,7 @@ func TestParse(t *testing.T) {
t.Errorf(err.Error()) t.Errorf(err.Error())
} }
_, err = parseRabinString(r, chk2) _, err = parseRabinString(r, chk2)
if err == nil || err.Error() != ErrRabinMin.Error() { if err == ErrRabinMin {
t.Errorf("it should be a ErrRabinMin here.") t.Log("it should be ErrRabinMin here.")
} }
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment