go-utils/utils/bytes_test.go
Oskar 1cb931d9ef
chore: new tests
* Create bytes_test.go
* Create cpu_test.go
* Create memory_test.go
* Create uptime_test.go
2021-10-24 14:50:52 +02:00

17 lines
182 B
Go

package utils
import "testing"
func TestBytes(t *testing.T) {
// 1
r := Bytes(53)
if r != "53 B" {
t.Fatal(r)
}
// 2
r = Bytes(1522)
if r != "1.5 kB" {
t.Fatal(r)
}
}