Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for IntVal (0.32 sec)

  1. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

    	fuzz "github.com/google/gofuzz"
    )
    
    func TestFromInt(t *testing.T) {
    	i := FromInt(93)
    	if i.Type != Int || i.IntVal != 93 {
    		t.Errorf("Expected IntVal=93, got %+v", i)
    	}
    }
    
    func TestFromInt32(t *testing.T) {
    	i := FromInt32(93)
    	if i.Type != Int || i.IntVal != 93 {
    		t.Errorf("Expected IntVal=93, got %+v", i)
    	}
    }
    
    func TestFromString(t *testing.T) {
    	i := FromString("76")
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  2. src/fmt/scan_test.go

    	{"21\n", &intVal, 21},
    	{"2_1\n", &intVal, 21},
    	{"0\n", &intVal, 0},
    	{"000\n", &intVal, 0},
    	{"0x10\n", &intVal, 0x10},
    	{"0x_1_0\n", &intVal, 0x10},
    	{"-0x10\n", &intVal, -0x10},
    	{"0377\n", &intVal, 0377},
    	{"0_3_7_7\n", &intVal, 0377},
    	{"0o377\n", &intVal, 0377},
    	{"0o_3_7_7\n", &intVal, 0377},
    	{"-0377\n", &intVal, -0377},
    	{"-0o377\n", &intVal, -0377},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 20:25:13 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  3. src/go/constant/value.go

    func (ratVal) implementsValue()     {}
    func (intVal) implementsValue()     {}
    func (floatVal) implementsValue()   {}
    func (complexVal) implementsValue() {}
    
    func newInt() *big.Int     { return new(big.Int) }
    func newRat() *big.Rat     { return new(big.Rat) }
    func newFloat() *big.Float { return new(big.Float).SetPrec(prec) }
    
    func i64toi(x int64Val) intVal   { return intVal{newInt().SetInt64(int64(x))} }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  4. pilot/cmd/pilot-agent/status/server_test.go

    			HTTPGet: &apimirror.HTTPGetAction{
    				Path: "/hello/sunnyvale",
    				Port: apimirror.IntOrString{IntVal: int32(appPort)},
    			},
    		},
    		"/app-health/hello-world/livez": &Prober{
    			HTTPGet: &apimirror.HTTPGetAction{
    				Port: apimirror.IntOrString{IntVal: int32(appPort)},
    			},
    		},
    	}
    	simpleTCPConfig := KubeAppProbers{
    		"/app-health/hello-world/readyz": &Prober{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 23 15:07:03 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/phases/addons/dns/dns_test.go

    								Protocol: v1.ProtocolUDP,
    								TargetPort: intstr.IntOrString{
    									Type:   0,
    									IntVal: 53,
    								},
    							},
    							{
    								Name:     "dns-tcp",
    								Port:     53,
    								Protocol: v1.ProtocolTCP,
    								TargetPort: intstr.IntOrString{
    									Type:   0,
    									IntVal: 53,
    								},
    							},
    						},
    						Selector: map[string]string{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 10:21:20 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  6. pkg/apis/core/fuzzer/fuzzer.go

    				c.Fuzz(&ss.Ports[0])
    			}
    			for i := range ss.Ports {
    				switch ss.Ports[i].TargetPort.Type {
    				case intstr.Int:
    					ss.Ports[i].TargetPort.IntVal = 1 + ss.Ports[i].TargetPort.IntVal%65535 // non-zero
    				case intstr.String:
    					ss.Ports[i].TargetPort.StrVal = "x" + ss.Ports[i].TargetPort.StrVal // non-empty
    				}
    			}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 04:32:01 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  7. pkg/apis/networking/validation/validation.go

    		if port.Port.Type == intstr.Int {
    			for _, msg := range validation.IsValidPortNum(int(port.Port.IntVal)) {
    				allErrs = append(allErrs, field.Invalid(portPath.Child("port"), port.Port.IntVal, msg))
    			}
    			if port.EndPort != nil {
    				if *port.EndPort < port.Port.IntVal {
    					allErrs = append(allErrs, field.Invalid(portPath.Child("endPort"), port.Port.IntVal, "must be greater than or equal to `port`"))
    				}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 07 14:48:01 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  8. operator/pkg/object/objects.go

    		case int64:
    			ii = intstr.FromInt32(int32(item))
    		case string:
    			ii = intstr.FromString(item)
    		default:
    			ii = intstr.FromInt32(0)
    		}
    		intVal, err := intstr.GetScaledValueFromIntOrPercent(&ii, 100, false)
    		if err != nil || intVal == 0 {
    			return true
    		}
    		return false
    	}
    	if spec["maxUnavailable"] != nil && spec["minAvailable"] != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 21 07:16:46 UTC 2023
    - 15.5K bytes
    - Viewed (1)
  9. staging/src/k8s.io/apimachinery/pkg/runtime/converter_test.go

    		return
    	}
    
    	if !reflect.DeepEqual(item, newObj) {
    		t.Errorf("Object changed, diff: %v", cmp.Diff(item, newObj))
    	}
    }
    
    func TestRoundTrip(t *testing.T) {
    	intVal := int64(42)
    	testCases := []struct {
    		obj interface{}
    	}{
    		{
    			obj: &unstructured.UnstructuredList{
    				Object: map[string]interface{}{
    					"kind": "List",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 16:02:13 UTC 2023
    - 22.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/staticdata/data.go

    	switch u := c.Val(); u.Kind() {
    	case constant.Bool:
    		i := int64(obj.Bool2int(constant.BoolVal(u)))
    		s.WriteInt(base.Ctxt, noff, wid, i)
    
    	case constant.Int:
    		s.WriteInt(base.Ctxt, noff, wid, ir.IntVal(c.Type(), u))
    
    	case constant.Float:
    		f, _ := constant.Float64Val(u)
    		switch c.Type().Kind() {
    		case types.TFLOAT32:
    			s.WriteFloat32(base.Ctxt, noff, float32(f))
    		case types.TFLOAT64:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:08:50 UTC 2023
    - 10.3K bytes
    - Viewed (0)
Back to top