Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for 12Mi (0.06 sec)

  1. staging/src/k8s.io/apiserver/pkg/cel/library/quantity_test.go

    func TestQuantity(t *testing.T) {
    	twelveMi := resource.MustParse("12Mi")
    	trueVal := types.Bool(true)
    	falseVal := types.Bool(false)
    
    	cases := []struct {
    		name               string
    		expr               string
    		expectValue        ref.Val
    		expectedCompileErr []string
    		expectedRuntimeErr string
    	}{
    		{
    			name:        "parse",
    			expr:        `quantity("12Mi")`,
    			expectValue: apiservercel.Quantity{Quantity: &twelveMi},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go

    }
    
    // Format lists the three possible formattings of a quantity.
    type Format string
    
    const (
    	DecimalExponent = Format("DecimalExponent") // e.g., 12e6
    	BinarySI        = Format("BinarySI")        // e.g., 12Mi (12 * 2^20)
    	DecimalSI       = Format("DecimalSI")       // e.g., 12M  (12 * 10^6)
    )
    
    // MustParse turns the given string into a quantity or panics; for tests
    // or other cases where you know the string is valid.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:10 UTC 2024
    - 23.8K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/cel/library/cost_test.go

    		name                string
    		expr                string
    		expectEstimatedCost checker.CostEstimate
    		expectRuntimeCost   uint64
    	}{
    		{
    			name:                "path",
    			expr:                `quantity("12Mi")`,
    			expectEstimatedCost: checker.CostEstimate{Min: 1, Max: 1},
    			expectRuntimeCost:   1,
    		},
    		{
    			name:                "isQuantity",
    			expr:                `isQuantity("20")`,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 40.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/scanner_test.go

    		{FloatLit, "0p0", "0p0", "'p' exponent requires hexadecimal mantissa"},
    		{FloatLit, "1.0P-1", "1.0P-1", "'P' exponent requires hexadecimal mantissa"},
    
    		{ImagLit, "0.i", "0.i", ""},
    		{ImagLit, ".123i", ".123i", ""},
    		{ImagLit, "123.123i", "123.123i", ""},
    		{ImagLit, "123e+0i", "123e+0i", ""},
    		{ImagLit, "123.E-10i", "123.E-10i", ""},
    		{ImagLit, ".123E+10i", ".123E+10i", ""},
    
    		// hexadecimals
    		{IntLit, "0x0", "0x0", ""},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 16:11:21 UTC 2022
    - 21.9K bytes
    - Viewed (0)
  5. src/go/scanner/scanner_test.go

    		{token.FLOAT, "1.0P-1", "1.0P-1", "'P' exponent requires hexadecimal mantissa"},
    
    		{token.IMAG, "0.i", "0.i", ""},
    		{token.IMAG, ".123i", ".123i", ""},
    		{token.IMAG, "123.123i", "123.123i", ""},
    		{token.IMAG, "123e+0i", "123e+0i", ""},
    		{token.IMAG, "123.E-10i", "123.E-10i", ""},
    		{token.IMAG, ".123E+10i", ".123E+10i", ""},
    
    		// hexadecimals
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 15:38:31 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  6. src/cmd/gofmt/testdata/go2numbers.golden

    	_ = 0x_dead_cafe.p-10
    	_ = 0x12_34.p1_2_3
    	_ = 0x1_2_3_4.p-1_2_3
    
    	// imaginaries
    	_ = 0i
    	_ = 0i
    	_ = 8i
    	_ = 0i
    	_ = 123i
    	_ = 123i
    	_ = 56789i
    	_ = 1234i
    	_ = 1234567i
    
    	_ = 0i
    	_ = 0i
    	_ = 8i
    	_ = 0i
    	_ = 123i
    	_ = 123i
    	_ = 56_789i
    	_ = 1_234i
    	_ = 1_234_567i
    
    	_ = 0.i
    	_ = 123.i
    	_ = 0123.i
    	_ = 000123.i
    
    	_ = 0e0i
    	_ = 123e0i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 21 17:24:29 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  7. src/go/printer/testdata/go2numbers.norm

    	_	= 0x_dead_cafe.p-10
    	_	= 0x12_34.p1_2_3
    	_	= 0x1_2_3_4.p-1_2_3
    
    	// imaginaries
    	_	= 0i
    	_	= 0i
    	_	= 8i
    	_	= 0i
    	_	= 123i
    	_	= 123i
    	_	= 56789i
    	_	= 1234i
    	_	= 1234567i
    
    	_	= 0i
    	_	= 0i
    	_	= 8i
    	_	= 0i
    	_	= 123i
    	_	= 123i
    	_	= 56_789i
    	_	= 1_234i
    	_	= 1_234_567i
    
    	_	= 0.i
    	_	= 123.i
    	_	= 0123.i
    	_	= 000123.i
    
    	_	= 0e0i
    	_	= 123e0i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jul 17 02:15:01 UTC 2020
    - 1.9K bytes
    - Viewed (0)
  8. src/strconv/atoc_test.go

    		{"+0e-0+0e-0i", 0, nil},
    		{"0e+0+0e+0i", 0, nil},
    		{"-0e+0-0e+0i", 0, nil},
    
    		// Regular non-zeroes
    		{"0.1", 0.1, nil},
    		{"0.1i", 0 + 0.1i, nil},
    		{"0.123", 0.123, nil},
    		{"0.123i", 0 + 0.123i, nil},
    		{"0.123+0.123i", 0.123 + 0.123i, nil},
    		{"99", 99, nil},
    		{"+99", 99, nil},
    		{"-99", -99, nil},
    		{"+1i", 1i, nil},
    		{"-1i", -1i, nil},
    		{"+3+1i", 3 + 1i, nil},
    		{"30+3i", 30 + 3i, nil},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 03 23:05:51 UTC 2020
    - 6.8K bytes
    - Viewed (0)
  9. src/internal/types/testdata/check/literals.go

    	assert(0X_dead_cafe.p-10 == 0xdeadcafe.p-10)
    	assert(0x12_34.P1_2_3 == 0x1234.p123)
    
    	assert(1_234i == 1234i)
    	assert(1_234_567i == 1234567i)
    
    	assert(0.i == 0i)
    	assert(123.i == 123i)
    	assert(0123.i == 123i)
    
    	assert(0.e+1i == 0i)
    	assert(123.E-1_0i == 123e-10i)
    	assert(01_23.e123i == 123e123i)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. src/go/format/format_test.go

    // Test that it is so even when numbers are normalized.
    func TestNodeNoModify(t *testing.T) {
    	const (
    		src    = "package p\n\nconst _ = 0000000123i\n"
    		golden = "package p\n\nconst _ = 123i\n"
    	)
    
    	fset := token.NewFileSet()
    	file, err := parser.ParseFile(fset, "", src, parser.ParseComments)
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// Capture original address and value of a BasicLit node
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 20 03:54:46 UTC 2021
    - 4.5K bytes
    - Viewed (0)
Back to top