mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
14 lines
196 B
Go
14 lines
196 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"runtime"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNumProcs(t *testing.T) {
|
||
|
n := numProcs()
|
||
|
if n != runtime.NumCPU()-1 {
|
||
|
t.Errorf("Expected numProcs to return NumCPU-1, got %d", n)
|
||
|
}
|
||
|
}
|