Files
flora-kit/geoip_test.go
Jason Lee 9ffd8157ad Fix test
2016-11-18 17:02:12 +08:00

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")
}
}