From: Russ Cox Date: Thu, 21 Feb 2013 18:30:31 +0000 (-0500) Subject: runtime: better error from TestGcSys when gc is disabled X-Git-Tag: go1.1rc2~921 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5833c96b0a3b1e77b787ee9b908456a7334f7821;p=gostls13.git runtime: better error from TestGcSys when gc is disabled R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/7390047 --- diff --git a/src/pkg/runtime/gc_test.go b/src/pkg/runtime/gc_test.go index 283a6812e9..0215ff2cf4 100644 --- a/src/pkg/runtime/gc_test.go +++ b/src/pkg/runtime/gc_test.go @@ -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()