-
Notifications
You must be signed in to change notification settings - Fork 0
/
stats_test.go
61 lines (52 loc) · 1.26 KB
/
stats_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package main
import "testing"
func TestStatsIncrPort(t *testing.T) {
statsIncrPort(3744)
statsIncrPort(3744)
statsIncrPort(2335)
for i := 0; i < 125; i++ {
statsIncrPort(226)
}
statsIncrPort(3744)
statsIncrPort(47223)
for i := 0; i < 17; i++ {
statsIncrPort(207)
}
}
func TestStatsIncrIP(t *testing.T) {
statsIncrIP("126.235.23.16")
statsIncrIP("16.63.23.16")
statsIncrIP("126.235.333.16")
for i := 0; i < 17; i++ {
statsIncrIP("126.235.333.16")
}
statsIncrIP("126.235.23.16")
statsIncrIP("126.235.333.16")
for i := 0; i < 125; i++ {
statsIncrIP("123.10.315.90")
}
statsIncrIP("126.235.333.16")
}
func TestStatsGetNUniquePorts(t *testing.T) {}
func TestStatsGetNUniqueIPs(t *testing.T) {}
func TestStatsGetLeadingPorts(t *testing.T) {
TestStatsIncrPort(t)
ls := statsGetLeadingPorts(3)
t.Log(ls)
}
func TestStatsGetLeadingIPs(t *testing.T) {
TestStatsIncrIP(t)
ls := statsGetLeadingIPs(5)
t.Log(ls)
}
func TestStatsClearPorts(t *testing.T) {}
func TestStatsClearIPs(t *testing.T) {}
func TestLeadersStringers(t *testing.T) {
TestStatsIncrPort(t)
lsports := statsGetLeadingPorts(3)
TestStatsIncrIP(t)
lsips := statsGetLeadingIPs(5)
txtLeadersPorts := lsports.String()
txtLeadersIPs := lsips.String()
t.Log(txtLeadersPorts, txtLeadersIPs)
}