Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for makeAcc (0.12 sec)

  1. src/math/big/float.go

    		z.prec = 0
    		if z.form == finite {
    			// truncate z to 0
    			z.acc = makeAcc(z.neg)
    			z.form = zero
    		}
    		return z
    	}
    
    	// general case
    	if prec > MaxPrec {
    		prec = MaxPrec
    	}
    	old := z.prec
    	z.prec = uint32(prec)
    	if z.prec < old {
    		z.round(0)
    	}
    	return z
    }
    
    func makeAcc(above bool) Accuracy {
    	if above {
    		return Above
    	}
    	return Below
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 15:46:54 UTC 2024
    - 44.5K bytes
    - Viewed (0)
  2. plugin/pkg/admission/network/denyserviceexternalips/admission_test.go

    		newSvc: makeSvc("1.1.1.1", "2.2.2.2"),
    		oldSvc: makeSvc("1.1.1.1", "3.3.3.3"),
    		fail:   true,
    	}, {
    		name:   "update: add externalIPs",
    		newSvc: makeSvc("1.1.1.1", "2.2.2.2"),
    		oldSvc: makeSvc("1.1.1.1"),
    		fail:   true,
    	}, {
    		name:   "update: erase externalIPs",
    		newSvc: makeSvc(),
    		oldSvc: makeSvc("1.1.1.1", "2.2.2.2"),
    	}, {
    		name:   "update: reduce externalIPs from back",
    		newSvc: makeSvc("1.1.1.1"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 14 05:36:44 UTC 2021
    - 3K bytes
    - Viewed (0)
  3. pkg/scheduler/framework/plugins/volumebinding/volume_binding_test.go

    			},
    			pvcs: []*v1.PersistentVolumeClaim{
    				makePVC("pvc-a", waitSC.Name).withBoundPV("pv-a").PersistentVolumeClaim,
    			},
    			pvs: []*v1.PersistentVolume{
    				makePV("pv-a", waitSC.Name).withPhase(v1.VolumeAvailable).PersistentVolume,
    			},
    			wantStateAfterPreFilter: &stateData{
    				podVolumeClaims: &PodVolumeClaims{
    					boundClaims: []*v1.PersistentVolumeClaim{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Dec 15 03:30:06 UTC 2023
    - 32K bytes
    - Viewed (0)
  4. pkg/proxy/conntrack/conntrack_test.go

    	for _, tc := range testCases {
    		ct := makeCT(success)
    		if err := ct.ClearEntriesForIP(tc.ip, v1.ProtocolUDP); err != nil {
    			t.Errorf("%s/success: Unexpected error: %v", tc.name, err)
    		}
    		execCommand := ct.getExecutedCommand()
    		if tc.expectCommand != execCommand {
    			t.Errorf("%s/success: Expect command: %s, but executed %s", tc.name, tc.expectCommand, execCommand)
    		}
    
    		ct = makeCT(nothingToDelete)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 18:08:36 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  5. pkg/controller/volume/persistentvolume/index_test.go

    			expectedMatch: "gce-pd-5",
    			claim:         makePVC("1G", nil),
    		},
    		"successful-no-match": {
    			expectedMatch: "",
    			claim:         makePVC("999G", nil),
    		},
    		"successful-no-match-due-to-label": {
    			expectedMatch: "",
    			claim: makePVC("999G", func(pvc *v1.PersistentVolumeClaim) {
    				pvc.Spec.Selector = &metav1.LabelSelector{
    					MatchLabels: map[string]string{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 21 13:31:28 UTC 2023
    - 44K bytes
    - Viewed (0)
  6. pkg/volume/util/resize_util_test.go

    }
    
    func TestMergeResizeCondition(t *testing.T) {
    	currentTime := metav1.Now()
    
    	pvc := makePVC([]v1.PersistentVolumeClaimCondition{
    		{
    			Type:               v1.PersistentVolumeClaimResizing,
    			Status:             v1.ConditionTrue,
    			LastTransitionTime: currentTime,
    		},
    	}).get()
    
    	noConditionPVC := makePVC([]v1.PersistentVolumeClaimCondition{}).get()
    
    	conditionFalseTime := metav1.Now()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  7. pkg/controller/volume/ephemeral/controller_test.go

    	testPodEphemeralClaim = makePVC(testPodName+"-"+ephemeralVolumeName, testNamespace, makeOwnerReference(testPodWithEphemeral, true))
    	conflictingClaim      = makePVC(testPodName+"-"+ephemeralVolumeName, testNamespace, nil)
    	otherNamespaceClaim   = makePVC(testPodName+"-"+ephemeralVolumeName, otherNamespace, nil)
    )
    
    func init() {
    	klog.InitFlags(nil)
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. test/fixedbugs/issue4313.go

    package main
    
    func main() {
    	c := make(chan int, 1)
    	x := 0
    	select {
    	case c <- x: // should see x = 0, not x = 42 (after makec)
    	case <-makec(&x): // should be evaluated only after c and x on previous line
    	}
    	y := <-c
    	if y != 0 {
    		panic(y)
    	}
    }
    
    func makec(px *int) chan bool {
    	if false { for {} }
    	*px = 42
    	return make(chan bool, 0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 546 bytes
    - Viewed (0)
  9. test/fixedbugs/issue49512.go

    	calls []func(int) (int, int)
    }
    
    func makeC() Funcs {
    	return &C{}
    }
    
    func (c *C) Add(fn func(int) (int, int)) Funcs {
    	c.calls = append(c.calls, fn)
    	return c
    }
    
    func (c *C) Call() {
    	for _, fn := range c.calls {
    		fn(0)
    	}
    }
    
    type Funcs interface {
    	Add(func(int) (int, int)) Funcs
    	Call()
    }
    
    func main() {
    	s := &S{}
    	c := makeC().Add(s.M1).Add(s.M2)
    	c.Call()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 11 04:02:33 UTC 2021
    - 809 bytes
    - Viewed (0)
  10. pkg/scheduler/framework/plugins/volumebinding/test_utils.go

    	pvb.PersistentVolume.Status = v1.PersistentVolumeStatus{
    		Phase: phase,
    	}
    	return pvb
    }
    
    type pvcBuilder struct {
    	*v1.PersistentVolumeClaim
    }
    
    func makePVC(name string, storageClassName string) pvcBuilder {
    	return pvcBuilder{PersistentVolumeClaim: &v1.PersistentVolumeClaim{
    		ObjectMeta: metav1.ObjectMeta{
    			Name:      name,
    			Namespace: v1.NamespaceDefault,
    		},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 13 07:42:19 UTC 2023
    - 4.9K bytes
    - Viewed (0)
Back to top