ipld-eth-server/vendor/github.com/ipfs/go-ipfs/thirdparty/unit/unit_test.go

27 lines
407 B
Go
Raw Normal View History

2019-04-11 18:19:10 +00:00
package unit
import "testing"
// and the award for most meta goes to...
func TestByteSizeUnit(t *testing.T) {
if 1*KB != 1*1024 {
t.Fatal(1 * KB)
}
if 1*MB != 1*1024*1024 {
t.Fail()
}
if 1*GB != 1*1024*1024*1024 {
t.Fail()
}
if 1*TB != 1*1024*1024*1024*1024 {
t.Fail()
}
if 1*PB != 1*1024*1024*1024*1024*1024 {
t.Fail()
}
if 1*EB != 1*1024*1024*1024*1024*1024*1024 {
t.Fail()
}
}