Improve error message for FetchBlockBySha test.wq

This commit is contained in:
Dave Collins 2013-10-13 21:37:17 -05:00
parent 396d1b056d
commit 670d83a74e

View file

@ -65,8 +65,8 @@ func testInterface(t *testing.T, dbType string) {
t.Errorf("FetchBlockBySha: %v", err)
}
if !reflect.DeepEqual(block.MsgBlock(), blockFromDb.MsgBlock()) {
t.Errorf("Block from database does not match stored "+
"block\ngot: %v\nwant: %v",
t.Errorf("FetchBlockBySha: block from database does "+
"not match stored block\ngot: %v\nwant: %v",
spew.Sdump(blockFromDb.MsgBlock()),
spew.Sdump(block.MsgBlock()))
return
@ -82,9 +82,9 @@ func testInterface(t *testing.T, dbType string) {
return
}
if !reflect.DeepEqual(blockBytes, blockFromDbBytes) {
t.Errorf("Block bytes from database do not match "+
"stored block bytes\ngot: %v\nwant: %v",
spew.Sdump(blockFromDbBytes),
t.Errorf("FetchBlockBySha: block bytes from database "+
"do not match stored block bytes\ngot: %v\n"+
"want: %v", spew.Sdump(blockFromDbBytes),
spew.Sdump(blockBytes))
return
}