mirror of
https://github.com/zhigang1992/flora-kit.git
synced 2026-04-29 04:15:28 +08:00
21 lines
391 B
Go
21 lines
391 B
Go
package main_test
|
|
|
|
import (
|
|
"github.com/huacnlee/flora-kit/flora"
|
|
"testing"
|
|
)
|
|
|
|
func TestGeoIP(t *testing.T) {
|
|
if flora.GeoIPString("121.0.29.91") != "cn" {
|
|
t.Errorf("121.0.29.91 should be cn")
|
|
}
|
|
|
|
if flora.GeoIPString("218.253.0.89") != "hk" {
|
|
t.Errorf("218.253.0.89 should be hk")
|
|
}
|
|
|
|
if flora.GeoIPString("218.176.242.11") != "jp" {
|
|
t.Errorf("218.176.242.11 should be jp")
|
|
}
|
|
}
|