Update test style to checker

This commit is contained in:
Taylor Gerring 2014-11-11 19:05:35 +01:00
parent d9ccbf04db
commit bfd1fe977e
1 changed files with 3 additions and 15 deletions

View File

@ -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)
}