aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2014-11-12 02:05:35 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2014-11-12 02:05:35 +0800
commitbfd1fe977e1a4f921fce6b4ca522b024df0b2733 (patch)
tree8ff3921d6c07c2081d4f5bf490360da6ef83abab
parentd9ccbf04dbdcda527c00e561aa0cc97ffde08f86 (diff)
downloaddexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar.gz
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar.bz2
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar.lz
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar.xz
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.tar.zst
dexon-bfd1fe977e1a4f921fce6b4ca522b024df0b2733.zip
Update test style to checker
-rw-r--r--ethutil/size_test.go18
1 files changed, 3 insertions, 15 deletions
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)
}