- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for testMain (0.56 sec)
-
src/testing/testing.go
// // When TestMain is called, flag.Parse has not been run. If TestMain depends on // command-line flags, including those of the testing package, it should call // flag.Parse explicitly. Command line flags are always parsed by the time test // or benchmark functions run. // // A simple implementation of TestMain is: // // func TestMain(m *testing.M) { // // call flag.Parse() here if TestMain uses flags // os.Exit(m.Run()) // }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 76.1K bytes - Viewed (0) -
cmd/test-utils_test.go
"github.com/minio/minio/internal/crypto" "github.com/minio/minio/internal/hash" "github.com/minio/minio/internal/logger" "github.com/minio/mux" "github.com/minio/pkg/v3/policy" ) // TestMain to set up global env. func TestMain(m *testing.M) { flag.Parse() // set to 'true' when testing is invoked globalIsTesting = true globalIsCICD = globalIsTesting globalActiveCred = auth.Credentials{
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Jun 10 15:50:49 UTC 2024 - 76.9K bytes - Viewed (0) -
src/cmd/go/go_test.go
if !*testWork { defer removeAll(testTmpDir) } testGOCACHE, _ = cache.DefaultDir() if testenv.HasGoBuild() { testBin = filepath.Join(testTmpDir, "testbin") if err := os.Mkdir(testBin, 0777); err != nil { log.Fatal(err) } testGo = filepath.Join(testBin, "go"+exeSuffix) gotool, err := testenv.GoTool() if err != nil { fmt.Fprintln(os.Stderr, "locating go tool: ", err) os.Exit(2)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 81.1K bytes - Viewed (0) -
src/os/os_test.go
"io/fs" "log" . "os" "os/exec" "path/filepath" "reflect" "runtime" "runtime/debug" "slices" "strings" "sync" "syscall" "testing" "testing/fstest" "time" ) func TestMain(m *testing.M) { if Getenv("GO_OS_TEST_DRAIN_STDIN") == "1" { Stdout.Close() io.Copy(io.Discard, Stdin) Exit(0) } log.SetFlags(log.LstdFlags | log.Lshortfile) Exit(m.Run()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/cmd/go/internal/test/test.go
} if !cfg.BuildN { // writeTestmain writes _testmain.go, // using the test description gathered in t. if err := os.WriteFile(testDir+"_testmain.go", *pmain.Internal.TestmainGo, 0666); err != nil { return nil, nil, nil, err } } // Set compile objdir to testDir we've already created, // so that the default file path stripping applies to _testmain.go.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 14:34:32 UTC 2024 - 71.9K bytes - Viewed (0)