Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-chunker
Commits
4a54cc58
Commit
4a54cc58
authored
Sep 29, 2018
by
Kejie Zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update parse test
parent
449ca440
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
parse_test.go
parse_test.go
+16
-1
No files found.
parse_test.go
View file @
4a54cc58
...
...
@@ -5,7 +5,7 @@ import (
"testing"
)
func
TestParse
(
t
*
testing
.
T
)
{
func
TestParse
Rabin
(
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
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment