Revert r215321.
[official-gcc.git] / libgo / go / net / cgo_unix_test.go
blob33566ce9c2e1c6ca253b0ce4818b95a6e8350d57
1 // 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.
5 // +build cgo,!netgo
6 // +build darwin dragonfly freebsd linux netbsd openbsd
8 package net
10 import "testing"
12 func TestCgoLookupIP(t *testing.T) {
13 host := "localhost"
14 _, err, ok := cgoLookupIP(host)
15 if !ok {
16 t.Errorf("cgoLookupIP must not be a placeholder")
18 if err != nil {
19 t.Errorf("cgoLookupIP failed: %v", err)
21 if _, err := goLookupIP(host); err != nil {
22 t.Errorf("goLookupIP failed: %v", err)