Files
gocryptotrader/utils/utils_test.go
Adrian Gallagher f5914e8c10 Engine changes
2019-05-22 17:06:38 +10:00

23 lines
500 B
Go

package utils
import (
"runtime"
"testing"
)
func TestAdjustGoMaxProcs(t *testing.T) {
// Ensure that a supplied crazy number is set to a valid one and doesn't
// return an error
err := AdjustGoMaxProcs(1000)
if err != nil {
t.Fatalf("TestAdjustGoMaxProcs returned err: %v", err)
}
// This time use the num of logical CPU's and ensure it doesn't
// return an error
err = AdjustGoMaxProcs(runtime.NumCPU())
if err != nil {
t.Fatalf("TestAdjustGoMaxProcs returned err: %v", err)
}
}