blob: 1d950d67d7c232fa49c8444fdd9be9d669befdc5 [file] [log] [blame]
Mikio Hara2b3ad822013-12-19 07:40:10 +09001// Copyright 2013 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// +build !cgo netgo
Mikio Haraf706d702014-03-03 07:09:28 +09006// +build darwin dragonfly freebsd linux netbsd openbsd solaris
Mikio Hara2b3ad822013-12-19 07:40:10 +09007
8package net
9
10import "testing"
11
12func TestGoLookupIP(t *testing.T) {
13 host := "localhost"
14 _, err, ok := cgoLookupIP(host)
15 if ok {
16 t.Errorf("cgoLookupIP must be a placeholder")
17 }
18 if err != nil {
Mikio Haraf77e10f2015-05-01 12:38:42 +090019 t.Error(err)
Mikio Hara2b3ad822013-12-19 07:40:10 +090020 }
21 if _, err := goLookupIP(host); err != nil {
Mikio Haraf77e10f2015-05-01 12:38:42 +090022 t.Error(err)
Mikio Hara2b3ad822013-12-19 07:40:10 +090023 }
24}