mirror of
https://github.com/golang/go
synced 2024-11-13 19:00:25 -07:00
runtime: better error from TestGcSys when gc is disabled
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7390047
This commit is contained in:
parent
94fab3cad3
commit
5833c96b0a
@ -5,11 +5,15 @@
|
||||
package runtime_test
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestGcSys(t *testing.T) {
|
||||
if os.Getenv("GOGC") == "off" {
|
||||
t.Fatalf("GOGC=off in environment; test cannot pass")
|
||||
}
|
||||
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(1))
|
||||
memstats := new(runtime.MemStats)
|
||||
runtime.GC()
|
||||
|
Loading…
Reference in New Issue
Block a user