Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for newInt (0.41 sec)

  1. src/math/big/int_test.go

    	z, x, y *Int
    }
    
    var sumZZ = []argZZ{
    	{NewInt(0), NewInt(0), NewInt(0)},
    	{NewInt(1), NewInt(1), NewInt(0)},
    	{NewInt(1111111110), NewInt(123456789), NewInt(987654321)},
    	{NewInt(-1), NewInt(-1), NewInt(0)},
    	{NewInt(864197532), NewInt(-123456789), NewInt(987654321)},
    	{NewInt(-1111111110), NewInt(-123456789), NewInt(-987654321)},
    }
    
    var prodZZ = []argZZ{
    	{NewInt(0), NewInt(0), NewInt(0)},
    	{NewInt(0), NewInt(1), NewInt(0)},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 58.5K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity_test.go

    		expect string
    	}{
    		{bigDec(big.NewInt(1), 0), "1"},
    		{bigDec(big.NewInt(1), 1), "10"},
    		{bigDec(big.NewInt(5), 2), "500"},
    		{bigDec(big.NewInt(8), 3), "8000"},
    		{bigDec(big.NewInt(2), 0), "2"},
    		{bigDec(big.NewInt(1), -1), "0.1"},
    		{bigDec(big.NewInt(3), -2), "0.03"},
    		{bigDec(big.NewInt(4), -3), "0.004"},
    		{bigDec(big.NewInt(0).Add(bigMostPositive, big.NewInt(1)), 0), "9223372036854775808"},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 49.4K bytes
    - Viewed (0)
  3. src/crypto/tls/tls_test.go

    	keyDER, err := x509.MarshalPKCS8PrivateKey(key)
    	if err != nil {
    		t.Fatal(err)
    	}
    	keyPEM := pem.EncodeToMemory(&pem.Block{Type: "PRIVATE KEY", Bytes: keyDER})
    	tmpl := &x509.Certificate{
    		SerialNumber: big.NewInt(1),
    		Subject:      pkix.Name{CommonName: "test"},
    	}
    	certDER, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, key.Public(), key)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 60.5K bytes
    - Viewed (0)
  4. src/text/template/exec_test.go

    	NonEmptyInterfacePtS:      &siVal,
    	NonEmptyInterfaceTypedNil: (*T)(nil),
    	Str:                       bytes.NewBuffer([]byte("foozle")),
    	Err:                       errors.New("erroozle"),
    	PI:                        newInt(23),
    	PS:                        newString("a string"),
    	PSI:                       newIntSlice(21, 22, 23),
    	BinaryFunc:                func(a, b string) string { return fmt.Sprintf("[%s=%s]", a, b) },
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 22:23:55 UTC 2024
    - 60.1K bytes
    - Viewed (0)
  5. src/crypto/tls/handshake_client_test.go

    	serverWCC := &writeCountingConn{Conn: s}
    
    	serverConfig := testConfig.Clone()
    
    	// Cause a signature-time error
    	brokenKey := rsa.PrivateKey{PublicKey: testRSAPrivateKey.PublicKey}
    	brokenKey.D = big.NewInt(42)
    	serverConfig.Certificates = []Certificate{{
    		Certificate: [][]byte{testRSACertificate},
    		PrivateKey:  &brokenKey,
    	}}
    
    	go func() {
    		Server(serverWCC, serverConfig).Handshake()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 88.7K bytes
    - Viewed (0)
  6. src/runtime/pprof/pprof_test.go

    func TestMathBigDivide(t *testing.T) {
    	testCPUProfile(t, nil, func(duration time.Duration) {
    		t := time.After(duration)
    		pi := new(big.Int)
    		for {
    			for i := 0; i < 100; i++ {
    				n := big.NewInt(2646693125139304345)
    				d := big.NewInt(842468587426513207)
    				pi.Div(n, d)
    			}
    			select {
    			case <-t:
    				return
    			default:
    			}
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 18:42:28 UTC 2024
    - 68.8K bytes
    - Viewed (0)
  7. cmd/test-utils_test.go

    	if err != nil {
    		return nil, nil, fmt.Errorf("failed to generate private key: %w", err)
    	}
    
    	notBefore := time.Now()
    	notAfter := notBefore.Add(validFor)
    
    	serialNumberLimit := new(big.Int).Lsh(big.NewInt(1), 128)
    	serialNumber, err := crand.Int(crand.Reader, serialNumberLimit)
    	if err != nil {
    		return nil, nil, fmt.Errorf("failed to generate serial number: %w", err)
    	}
    
    	template := x509.Certificate{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 76.9K bytes
    - Viewed (0)
  8. pkg/scheduler/framework/plugins/noderesources/fit_test.go

    				test.args.ScoringStrategy = defaultScoringStrategy
    			}
    
    			_, ctx := ktesting.NewTestContext(t)
    			ctx, cancel := context.WithCancel(ctx)
    			defer cancel()
    			p, err := NewFit(ctx, &test.args, nil, plfeature.Features{})
    			if err != nil {
    				t.Fatal(err)
    			}
    			cycleState := framework.NewCycleState()
    			_, preFilterStatus := p.(framework.PreFilterPlugin).PreFilter(ctx, cycleState, test.pod)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 57.4K bytes
    - Viewed (0)
  9. src/runtime/map.go

    		advanceEvacuationMark(h, t, newbit)
    	}
    }
    
    func advanceEvacuationMark(h *hmap, t *maptype, newbit uintptr) {
    	h.nevacuate++
    	// Experiments suggest that 1024 is overkill by at least an order of magnitude.
    	// Put it in there as a safeguard anyway, to ensure O(1) behavior.
    	stop := h.nevacuate + 1024
    	if stop > newbit {
    		stop = newbit
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/storage/testing/watcher_tests.go

    	w.Stop()
    
    	// Compact previous versions
    	if compaction == nil {
    		t.Skip("compaction callback not provided")
    	}
    
    	// Update again
    	newOut := &example.Pod{}
    	err = store.GuaranteedUpdate(ctx, key, newOut, true, nil, storage.SimpleUpdate(
    		func(runtime.Object) (runtime.Object, error) {
    			return &example.Pod{ObjectMeta: metav1.ObjectMeta{Name: "foo", Namespace: "test-ns"}}, nil
    		}), nil)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 63.8K bytes
    - Viewed (0)
Back to top