Commit 4a54cc58 authored by Kejie Zhang's avatar Kejie Zhang

update parse test

parent 449ca440
......@@ -5,7 +5,7 @@ import (
"testing"
)
func TestParse(t *testing.T) {
func TestParseRabin(t *testing.T) {
max := 1000
r := bytes.NewReader(randBuf(t, max))
chk1 := "rabin-18-25-32"
......@@ -19,3 +19,18 @@ func TestParse(t *testing.T) {
t.Log("it should be ErrRabinMin here.")
}
}
func TestParseSize(t *testing.T) {
max := 1000
r := bytes.NewReader(randBuf(t, max))
size1 := "size-0"
size2 := "size-32"
_, err := FromString(r, size1)
if err == ErrSize {
t.Log("it should be ErrSize here.")
}
_, err = FromString(r, size2)
if err == ErrSize {
t.Fatal(err)
}
}
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