Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 217 for newRat (0.1 sec)

  1. src/cmd/compile/internal/pkginit/initAsanGlobals.go

    		// Assign globals[i].size.
    		g := n.(*ir.Name)
    		size := g.Type().Size()
    		c = typecheck.DefaultLit(ir.NewInt(base.Pos, size), types.Types[types.TUINTPTR])
    		setField("size", c, i)
    		// Assign globals[i].sizeWithRedzone.
    		rzSize := GetRedzoneSizeForGlobal(size)
    		sizeWithRz := rzSize + size
    		c = typecheck.DefaultLit(ir.NewInt(base.Pos, sizeWithRz), types.Types[types.TUINTPTR])
    		setField("sizeWithRedzone", c, i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:24 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  2. src/crypto/ecdsa/ecdsa_test.go

    		hashToNat(c, bigmod.NewNat(), h)
    	}
    }
    
    func TestZeroSignature(t *testing.T) {
    	testAllCurves(t, testZeroSignature)
    }
    
    func testZeroSignature(t *testing.T, curve elliptic.Curve) {
    	privKey, err := GenerateKey(curve, rand.Reader)
    	if err != nil {
    		panic(err)
    	}
    
    	if Verify(&privKey.PublicKey, make([]byte, 64), big.NewInt(0), big.NewInt(0)) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:58 UTC 2024
    - 13.5K bytes
    - Viewed (0)
  3. pkg/apis/resource/validation/validation_resourceclaim_test.go

    		},
    		"missing-name": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			claim:        testClaim("", goodNS, goodClaimSpec),
    		},
    		"bad-name": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 09:18:10 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  4. src/math/big/ratconv_test.go

    	}
    }
    
    func BenchmarkFloatPrecInexact(b *testing.B) {
    	for _, n := range []int{1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6} {
    		// d := 5^n + 1
    		d := NewInt(5)
    		p := NewInt(int64(n))
    		d.Exp(d, p, nil)
    		d.Add(d, NewInt(1))
    
    		// r := 1/d
    		var r Rat
    		r.SetFrac(NewInt(1), d)
    
    		b.Run(fmt.Sprint(n), func(b *testing.B) {
    			for i := 0; i < b.N; i++ {
    				_, ok := r.FloatPrec()
    				if ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 15 22:16:34 UTC 2023
    - 19.3K bytes
    - Viewed (0)
  5. src/crypto/x509/x509_test.go

    	revokedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    			SerialNumber: big.NewInt(42),
    			// RevocationTime should be converted to UTC before marshaling.
    			RevocationTime: now,
    		},
    	}
    	expectedCerts := []pkix.RevokedCertificate{
    		{
    			SerialNumber:   big.NewInt(1),
    			RevocationTime: nowUTC,
    		},
    		{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:00:16 UTC 2024
    - 163.4K bytes
    - Viewed (0)
  6. src/crypto/x509/oid.go

    	var (
    		first  = big.NewInt(0)
    		second = big.NewInt(0)
    	)
    
    	if _, ok := first.SetString(firstNum, 10); !ok {
    		return errInvalidOID
    	}
    	if _, ok := second.SetString(secondNum, 10); !ok {
    		return errInvalidOID
    	}
    
    	if first.Cmp(big.NewInt(2)) > 0 || (first.Cmp(big.NewInt(2)) < 0 && second.Cmp(big.NewInt(40)) >= 0) {
    		return errInvalidOID
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 19:10:38 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  7. pkg/apis/resource/validation/validation_resourceclassparameters_test.go

    		},
    		"missing-name": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			parameters:   testResourceClassParameters("", goodName, goodFilters),
    		},
    		"missing-namespace": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "namespace"), "")},
    			parameters:   testResourceClassParameters(goodName, "", goodFilters),
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 21:21:16 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. pkg/apis/resource/validation/validation_resourceclass_test.go

    			class: testClass(goodName, "acme.example.com"),
    		},
    		"missing-name": {
    			wantFailures: field.ErrorList{field.Required(field.NewPath("metadata", "name"), "name or generateName is required")},
    			class:        testClass("", goodName),
    		},
    		"bad-name": {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 09:18:10 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  9. pilot/pkg/model/addressmap_test.go

    )
    
    func TestAddressMapLen(t *testing.T) {
    	cases := []struct {
    		name     string
    		newMap   func() *model.AddressMap
    		expected int
    	}{
    		{
    			name: "nil addresses map",
    			newMap: func() *model.AddressMap {
    				return nil
    			},
    			expected: 0,
    		},
    		{
    			name: "empty addresses map",
    			newMap: func() *model.AddressMap {
    				m := model.AddressMap{}
    				m.AddAddressesFor(c1ID, make([]string, 0))
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  10. pkg/apis/apps/validation/validation.go

    	errs = append(errs, apivalidation.ValidateObjectMeta(&revision.ObjectMeta, true, ValidateControllerRevisionName, field.NewPath("metadata"))...)
    	if revision.Data == nil {
    		errs = append(errs, field.Required(field.NewPath("data"), "data is mandatory"))
    	}
    	errs = append(errs, apivalidation.ValidateNonnegativeField(revision.Revision, field.NewPath("revision"))...)
    	return errs
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Apr 06 22:11:20 UTC 2024
    - 41.4K bytes
    - Viewed (0)
Back to top