"flag"
"fmt"
"go/format"
+ "internal/godebug"
"internal/race"
"internal/testenv"
"io"
func TestCacheListStale(t *testing.T) {
tooSlow(t)
- if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {
+ if godebug.Get("gocacheverify") == "1" {
t.Skip("GODEBUG gocacheverify")
}
tg := testgo(t)
func TestCacheCoverage(t *testing.T) {
tooSlow(t)
- if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {
+ if godebug.Get("gocacheverify") == "1" {
t.Skip("GODEBUG gocacheverify")
}
func TestIssue22531(t *testing.T) {
tooSlow(t)
- if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {
+ if godebug.Get("gocacheverify") == "1" {
t.Skip("GODEBUG gocacheverify")
}
tg := testgo(t)
func TestIssue22596(t *testing.T) {
tooSlow(t)
- if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {
+ if godebug.Get("gocacheverify") == "1" {
t.Skip("GODEBUG gocacheverify")
}
tg := testgo(t)
func TestTestCache(t *testing.T) {
tooSlow(t)
- if strings.Contains(os.Getenv("GODEBUG"), "gocacheverify") {
+ if godebug.Get("gocacheverify") == "1" {
t.Skip("GODEBUG gocacheverify")
}
tg := testgo(t)
import (
. "internal/cpu"
+ "internal/godebug"
"internal/testenv"
"os"
"os/exec"
func TestAllCapabilitiesDisabled(t *testing.T) {
MustHaveDebugOptionsSupport(t)
- if os.Getenv("GODEBUG") != "cpu.all=off" {
+ if godebug.Get("cpu.all") != "off" {
t.Skipf("skipping test: GODEBUG=cpu.all=off not set")
}
import (
. "internal/cpu"
- "os"
+ "internal/godebug"
"testing"
)
func TestSSE3DebugOption(t *testing.T) {
MustHaveDebugOptionsSupport(t)
- if os.Getenv("GODEBUG") != "cpu.sse3=off" {
+ if godebug.Get("cpu.sse3") != "off" {
t.Skipf("skipping test: GODEBUG=cpu.sse3=off not set")
}