提交 99863973 编写于 作者: D DoMyJob

Fix a few test cases

Signed-off-by: NDoMyJob <46307927+DoMyJob@users.noreply.github.com>
上级 f2584e02
......@@ -34,7 +34,7 @@ func TestHeaderPrint(t *testing.T) {
unsafe.Offsetof(header.RangeCapacity), unsafe.Sizeof(header.RangeCapacity),
unsafe.Offsetof(header.RangeCoverage), unsafe.Sizeof(header.RangeCoverage),
unsafe.Offsetof(header.HashOffset), unsafe.Sizeof(header.HashOffset),
unsafe.Offsetof(header.DataCount), unsafe.Sizeof(header.DataCount),
unsafe.Offsetof(header.DataEndPoint), unsafe.Sizeof(header.DataEndPoint),
unsafe.Offsetof(header.RecycleOffset), unsafe.Sizeof(header.RecycleOffset),
unsafe.Offsetof(header.Reserved), unsafe.Sizeof(header.Reserved))
}
......@@ -12,7 +12,7 @@ import (
)
var (
debugPrint bool = opt.DebugPrint
debugPrint = opt.DebugPrint
)
type storageContext struct {
......
......@@ -46,7 +46,6 @@ func TestValidateYottaDiskWithFileStorage(t *testing.T) {
if err != nil {
t.Fatal(err)
}
defer yd.Close()
yd.WriteData(0, []byte{0})
yd.WriteData(1, []byte{1})
......@@ -58,7 +57,7 @@ func TestValidateYottaDiskWithFileStorage(t *testing.T) {
}
defer ydRef1.Close()
if reflect.DeepEqual(yd.meta, ydRef1.meta) {
if !reflect.DeepEqual(yd.meta, ydRef1.meta) {
t.Fatal()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册