浏览代码

Mend tests

Jakob Borg 10 年之前
父节点
当前提交
a693698279
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      common_test.go

+ 2 - 2
common_test.go

@@ -31,11 +31,11 @@ func (t *TestModel) Index(deviceID DeviceID, folder string, files []FileInfo, fl
 func (t *TestModel) IndexUpdate(deviceID DeviceID, folder string, files []FileInfo, flags uint32, options []Option) {
 func (t *TestModel) IndexUpdate(deviceID DeviceID, folder string, files []FileInfo, flags uint32, options []Option) {
 }
 }
 
 
-func (t *TestModel) Request(deviceID DeviceID, folder, name string, offset int64, size int, hash []byte, flags uint32, options []Option, buf []byte) error {
+func (t *TestModel) Request(deviceID DeviceID, folder, name string, offset int64, hash []byte, flags uint32, options []Option, buf []byte) error {
 	t.folder = folder
 	t.folder = folder
 	t.name = name
 	t.name = name
 	t.offset = offset
 	t.offset = offset
-	t.size = size
+	t.size = len(buf)
 	t.hash = hash
 	t.hash = hash
 	t.flags = flags
 	t.flags = flags
 	t.options = options
 	t.options = options