mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 14:58:26 +00:00
Woops, fix scanner test
This commit is contained in:
parent
ba676f2810
commit
37fb6473b3
@ -149,7 +149,7 @@ func TestVerify(t *testing.T) {
|
|||||||
// data should be an even multiple of blocksize long
|
// data should be an even multiple of blocksize long
|
||||||
data := []byte("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut e")
|
data := []byte("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut e")
|
||||||
buf := bytes.NewBuffer(data)
|
buf := bytes.NewBuffer(data)
|
||||||
var progress uint64
|
var progress int64
|
||||||
|
|
||||||
blocks, err := Blocks(buf, blocksize, 0, &progress)
|
blocks, err := Blocks(buf, blocksize, 0, &progress)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -159,7 +159,7 @@ func TestVerify(t *testing.T) {
|
|||||||
t.Fatalf("Incorrect number of blocks %d != %d", len(blocks), exp)
|
t.Fatalf("Incorrect number of blocks %d != %d", len(blocks), exp)
|
||||||
}
|
}
|
||||||
|
|
||||||
if uint64(len(data)) != progress {
|
if int64(len(data)) != progress {
|
||||||
t.Fatalf("Incorrect counter value %d != %d", len(data), progress)
|
t.Fatalf("Incorrect counter value %d != %d", len(data), progress)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user