diff --git a/ethutil/size_test.go b/ethutil/size_test.go index 098e41cd4..e0f28abc5 100644 --- a/ethutil/size_test.go +++ b/ethutil/size_test.go @@ -17,19 +17,7 @@ func (s *SizeSuite) TestStorageSizeString(c *checker.C) { exp2 := "2.19 kB" exp3 := "12.00 B" - res1 := StorageSize(data1).String() - res2 := StorageSize(data2).String() - res3 := StorageSize(data3).String() - - if res1 != exp1 { - t.Errorf("Expected %s got %s", exp1, res1) - } - - if res2 != exp2 { - t.Errorf("Expected %s got %s", exp2, res2) - } - - if res3 != exp3 { - t.Errorf("Expected %s got %s", exp3, res3) - } + c.Assert(StorageSize(data1).String(), checker.Equals, exp1) + c.Assert(StorageSize(data2).String(), checker.Equals, exp2) + c.Assert(StorageSize(data3).String(), checker.Equals, exp3) }