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) {
return nil, err
}
if min < 16 {
return nil,ErrRabinMin
return nil, ErrRabinMin
}
sub = strings.Split(parts[2], ":")
if len(sub) > 1 && sub[0] != "avg" {
......
package chunk
import (
"testing"
"bytes"
"testing"
)
func TestParse(t *testing.T) {
......@@ -15,7 +15,7 @@ func TestParse(t *testing.T) {
t.Errorf(err.Error())
}
_, err = parseRabinString(r, chk2)
if err == nil || err.Error() != ErrRabinMin.Error() {
t.Errorf("it should be a ErrRabinMin here.")
if err == ErrRabinMin {
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