-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibconst_test.go
46 lines (39 loc) · 870 Bytes
/
libconst_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package frizzante
import (
"testing"
)
func TestKB(test *testing.T) {
if 1024 != KB {
test.Fatalf("KB constant is not %d", 1024)
}
}
func TestMB(test *testing.T) {
expected := 1024 * 1024
if expected != MB {
test.Fatalf("MB constant is not %d", expected)
}
}
func TestGB(test *testing.T) {
expected := 1024 * 1024 * 1024
if expected != GB {
test.Fatalf("GB constant is not %d", expected)
}
}
func TestTB(test *testing.T) {
expected := 1024 * 1024 * 1024 * 1024
if expected != TB {
test.Fatalf("TB constant is not %d", expected)
}
}
func TestPB(test *testing.T) {
expected := 1024 * 1024 * 1024 * 1024 * 1024
if expected != PB {
test.Fatalf("PB constant is not %d", expected)
}
}
func TestEB(test *testing.T) {
expected := 1024 * 1024 * 1024 * 1024 * 1024 * 1024
if expected != EB {
test.Fatalf("EB constant is not %d", expected)
}
}