Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for unrepresentable (0.29 sec)

  1. src/encoding/gob/encoder_test.go

    		if err := dec.Decode(&s); err != nil {
    			t.Fatal("decoder fail:", err)
    		}
    		if s != fmt.Sprintf("%d", i) {
    			t.Fatalf("decode expected %d got %s", i, s)
    		}
    	}
    }
    
    // Should be able to have unrepresentable fields (chan, func, *chan etc.); we just ignore them.
    type Bug2 struct {
    	A   int
    	C   chan int
    	CP  *chan int
    	F   func()
    	FPP **func()
    }
    
    func TestChanFuncIgnored(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 29.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/util/intstr/intstr_test.go

    			want: []byte{0x18, 0xff},
    		},
    		{
    			in:   FromInt32(math.MaxUint8 + 1), // min positive integer representable in three bytes
    			want: []byte{0x19, 0x01, 0x00},
    		},
    		{
    			in:   FromInt32(math.MaxUint16), // max positive integer representable in three bytes
    			want: []byte{0x19, 0xff, 0xff},
    		},
    		{
    			in:   FromInt32(math.MaxUint16 + 1), // min positive integer representable in five bytes
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 21:48:09 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/math/BigIntegerMathTest.java

            .test();
      }
    
      @J2ktIncompatible
      @GwtIncompatible
      public void testRoundToDouble_maxPreciselyRepresentablePlusOne() {
        double twoToThe53 = Math.pow(2, 53);
        // the representable doubles are 2^53 and 2^53 + 2.
        // 2^53+1 is halfway between, so HALF_UP will go up and HALF_DOWN will go down.
        new RoundToDoubleTester(BigInteger.valueOf((1L << 53) + 1))
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Fri May 17 17:58:33 UTC 2024
    - 27.8K bytes
    - Viewed (0)
  4. src/unsafe/unsafe.go

    // The function Add adds len to ptr and returns the updated pointer
    // [Pointer](uintptr(ptr) + uintptr(len)).
    // The len argument must be of integer type or an untyped constant.
    // A constant len argument must be representable by a value of type int;
    // if it is an untyped constant it is given type int.
    // The rules for valid uses of Pointer still apply.
    func Add(ptr Pointer, len IntegerType) Pointer
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:45:20 UTC 2024
    - 12.1K bytes
    - Viewed (0)
  5. src/go/types/operand.go

    	}
    
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// x is an untyped value representable by a value of type T.
    	if isUntyped(Vu) {
    		assert(Vp == nil)
    		if Tp != nil {
    			// T is a type parameter: x is assignable to T if it is
    			// representable by each specific type in the type set of T.
    			return Tp.is(func(t *term) bool {
    				if t == nil {
    					return false
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/operand.go

    	}
    
    	Vu := under(V)
    	Tu := under(T)
    	Vp, _ := V.(*TypeParam)
    	Tp, _ := T.(*TypeParam)
    
    	// x is an untyped value representable by a value of type T.
    	if isUntyped(Vu) {
    		assert(Vp == nil)
    		if Tp != nil {
    			// T is a type parameter: x is assignable to T if it is
    			// representable by each specific type in the type set of T.
    			return Tp.is(func(t *term) bool {
    				if t == nil {
    					return false
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/check_test.go

    }
    
    func withSizes(sizes Sizes) func(*Config) {
    	return func(cfg *Config) {
    		cfg.Sizes = sizes
    	}
    }
    
    // TestIndexRepresentability tests that constant index operands must
    // be representable as int even if they already have a type that can
    // represent larger values.
    func TestIndexRepresentability(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 13.8K bytes
    - Viewed (0)
  8. src/runtime/string.go

    	return s
    }
    
    const (
    	maxUint64 = ^uint64(0)
    	maxInt64  = int64(maxUint64 >> 1)
    )
    
    // atoi64 parses an int64 from a string s.
    // The bool result reports whether s is a number
    // representable by a value of type int64.
    func atoi64(s string) (int64, bool) {
    	if s == "" {
    		return 0, false
    	}
    
    	neg := false
    	if s[0] == '-' {
    		neg = true
    		s = s[1:]
    	}
    
    	un := uint64(0)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  9. src/go/types/check_test.go

    }
    
    func withSizes(sizes Sizes) func(*Config) {
    	return func(cfg *Config) {
    		cfg.Sizes = sizes
    	}
    }
    
    // TestIndexRepresentability tests that constant index operands must
    // be representable as int even if they already have a type that can
    // represent larger values.
    func TestIndexRepresentability(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 19:45:33 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  10. src/runtime/type.go

    //
    // When a type is defined at run time, its *rtype data lives on the heap.
    // There are a wide range of possible addresses the heap may use, that
    // may not be representable as a 32-bit offset. Moreover the GC may
    // one day start moving heap memory, in which case there is no stable
    // offset that can be defined.
    //
    // To provide stable offsets, we add pin *rtype objects in a global map
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
Back to top