Retro68/gcc/libgo/go/net/cgo_unix_test.go

25 lines
533 B
Go
Raw Normal View History

2015-08-28 15:33:40 +00:00
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build cgo,!netgo
2017-04-10 11:32:00 +00:00
// +build darwin dragonfly freebsd linux netbsd openbsd solaris
2015-08-28 15:33:40 +00:00
package net
import "testing"
func TestCgoLookupIP(t *testing.T) {
host := "localhost"
_, err, ok := cgoLookupIP(host)
if !ok {
t.Errorf("cgoLookupIP must not be a placeholder")
}
if err != nil {
2017-04-10 11:32:00 +00:00
t.Error(err)
2015-08-28 15:33:40 +00:00
}
if _, err := goLookupIP(host); err != nil {
2017-04-10 11:32:00 +00:00
t.Error(err)
2015-08-28 15:33:40 +00:00
}
}