4d90afb425
mostly to handle build directives in 1.17.
20 lines
352 B
Go
20 lines
352 B
Go
//go:build darwin
|
|
// +build darwin
|
|
|
|
package freeport
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestGetEphemeralPortRange(t *testing.T) {
|
|
min, max, err := getEphemeralPortRange()
|
|
if err != nil {
|
|
t.Fatalf("err: %v", err)
|
|
}
|
|
if min <= 0 || max <= 0 || min > max {
|
|
t.Fatalf("unexpected values: min=%d, max=%d", min, max)
|
|
}
|
|
t.Logf("min=%d, max=%d", min, max)
|
|
}
|