Commit 5833c96b authored by Russ Cox's avatar Russ Cox

runtime: better error from TestGcSys when gc is disabled

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7390047
parent 94fab3ca
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment