You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
goip/ip_test.go

47 lines
819 B

2 years ago
package goip
2 years ago
import (
"context"
"testing"
)
2 years ago
2 years ago
func TestGetOutsideIp(t *testing.T) {
2 years ago
t.Log(GetOutsideIp(context.Background()))
2 years ago
}
func BenchmarkGetOutsideIp(b *testing.B) {
for i := 0; i < b.N; i++ {
2 years ago
b.Log(GetOutsideIp(context.Background()))
2 years ago
}
}
func TestGetInsideIp(t *testing.T) {
2 years ago
t.Log(GetInsideIp(context.Background()))
2 years ago
}
func BenchmarkGetInsideIp(b *testing.B) {
for i := 0; i < b.N; i++ {
2 years ago
b.Log(GetInsideIp(context.Background()))
2 years ago
}
}
func TestGetMacAddr(t *testing.T) {
2 years ago
t.Log(GetMacAddr(context.Background()))
2 years ago
}
func BenchmarkGetMacAddr(b *testing.B) {
for i := 0; i < b.N; i++ {
2 years ago
b.Log(GetMacAddr(context.Background()))
2 years ago
}
}
func TestIps(t *testing.T) {
2 years ago
t.Log(Ips(context.Background()))
2 years ago
}
2 years ago
func BenchmarkIps(b *testing.B) {
for i := 0; i < b.N; i++ {
2 years ago
b.Log(Ips(context.Background()))
2 years ago
}
}