mirror of
https://github.com/MedzikUser/go-utils.git
synced 2024-08-15 03:26:56 +00:00
Oskar
1cb931d9ef
* Create bytes_test.go * Create cpu_test.go * Create memory_test.go * Create uptime_test.go
17 lines
182 B
Go
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)
|
|
}
|
|
}
|