Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for testMain (1.21 sec)

  1. 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)
  2. 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)
  3. 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)
  4. staging/src/k8s.io/apiserver/pkg/server/filters/priority-and-fairness_test.go

    	"k8s.io/component-base/metrics/testutil"
    	"k8s.io/klog/v2"
    	clocktesting "k8s.io/utils/clock/testing"
    	"k8s.io/utils/ptr"
    
    	"github.com/google/go-cmp/cmp"
    )
    
    func TestMain(m *testing.M) {
    	klog.InitFlags(nil)
    	os.Exit(m.Run())
    }
    
    type mockDecision int
    
    const (
    	decisionNoQueuingExecute mockDecision = iota
    	decisionQueuingExecute
    	decisionCancelWait
    	decisionReject
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Oct 30 12:18:40 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  5. 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)
  6. staging/src/k8s.io/apiserver/pkg/util/flowcontrol/fairqueuing/queueset/queueset_test.go

    	if err != nil {
    		uss.t.Error(err)
    	} else {
    		uss.t.Logf("Success with apiserver_flowcontrol_epoch_advance_total = %d", uss.expectedEpochAdvances)
    	}
    }
    
    func TestMain(m *testing.M) {
    	klog.InitFlags(nil)
    	os.Exit(m.Run())
    }
    
    // TestNoRestraint tests whether the no-restraint factory gives every client what it asks for
    // even though that is unfair.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Sep 26 12:55:23 UTC 2023
    - 58.4K bytes
    - Viewed (0)
  7. src/math/all_test.go

    		}
    	}
    	for i := 0; i < len(vfacoshSC); i++ {
    		if f := Acosh(vfacoshSC[i]); !alike(acoshSC[i], f) {
    			t.Errorf("Acosh(%g) = %g, want %g", vfacoshSC[i], f, acoshSC[i])
    		}
    	}
    }
    
    func TestAsin(t *testing.T) {
    	for i := 0; i < len(vf); i++ {
    		a := vf[i] / 10
    		if f := Asin(a); !veryclose(asin[i], f) {
    			t.Errorf("Asin(%g) = %g, want %g", a, f, asin[i])
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 07 17:39:26 UTC 2023
    - 86.8K bytes
    - Viewed (0)
  8. 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)
  9. src/index/suffixarray/sais2.go

    	// so this one allocation is guaranteed to suffice for the entire stack
    	// of recursive calls.
    	tmp := oldTmp
    	if len(tmp) < len(saTmp) {
    		tmp = saTmp
    	}
    	if len(tmp) < numLMS {
    		// TestSAIS/forcealloc reaches this code.
    		n := maxID
    		if n < numLMS/2 {
    			n = numLMS / 2
    		}
    		tmp = make([]int64, n)
    	}
    
    	// sais_64 requires that the caller arrange to clear dst,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 23:57:18 UTC 2024
    - 52.3K bytes
    - Viewed (0)
Back to top