Search Options

Results per page
Sort
Preferred Languages
Advance

Results 201 - 210 of 987 for typeOf (0.1 sec)

  1. src/cmd/compile/internal/ssa/sizeof_test.go

    	var tests = []struct {
    		val    interface{} // type as a value
    		_32bit uintptr     // size on 32bit platforms
    		_64bit uintptr     // size on 64bit platforms
    	}{
    		{Value{}, 72, 112},
    		{Block{}, 164, 304},
    		{LocalSlot{}, 28, 40},
    		{valState{}, 28, 40},
    	}
    
    	for _, tt := range tests {
    		want := tt._32bit
    		if _64bit {
    			want = tt._64bit
    		}
    		got := reflect.TypeOf(tt.val).Size()
    		if want != got {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 08 01:46:40 UTC 2020
    - 855 bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go

    		}
    	}
    
    	// check that anything other than type and properties in metadata is forbidden
    	tt = reflect.TypeOf(Structural{})
    	for i := 0; i < tt.NumField(); i++ {
    		s := Structural{}
    		x := reflect.ValueOf(&s).Elem()
    		fuzzer.Fuzz(x.Field(i).Addr().Interface())
    		s.Type = "object"
    		s.Properties = map[string]Structural{
    			"name":         {},
    			"generateName": {},
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 18:20:00 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. security/pkg/pki/util/crypto_test.go

    		pem     string
    		keyType reflect.Type
    		errMsg  string
    	}{
    		"Invalid PEM string": {
    			pem:    "Invalid PEM string",
    			errMsg: "invalid PEM-encoded key",
    		},
    		"Invalid PEM block type": {
    			pem:    certRSA,
    			errMsg: "unsupported PEM block type for a private key: CERTIFICATE",
    		},
    		"Parse RSA key": {
    			pem:     keyRSA,
    			keyType: reflect.TypeOf(&rsa.PrivateKey{}),
    		},
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jun 04 13:00:07 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  4. test/fixedbugs/issue19028.dir/main.go

    package main
    
    import (
            "reflect"
            fake "./a" // 2nd package with name "reflect"
    )
    
    type T struct {
            _ fake.Type
    }
    
    func (T) f()            {}
    func (T) G() (_ int)    { return }
    func (T) H() (_, _ int) { return }
    
    func main() {
            var x T
            typ := reflect.TypeOf(x)
            for i := 0; i < typ.NumMethod(); i++ {
                    _ = typ.Method(i) // must not crash
            }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 15 20:45:24 UTC 2020
    - 569 bytes
    - Viewed (0)
  5. src/main/webapp/js/admin/plugins/form-validator/color.js

     *
     *  @version 2.3.77
     *  @website http://formvalidator.net/
     *  @author Victor Jonsson, http://victorjonsson.se
     *  @license MIT
     */
    Registered: Wed Jun 12 13:08:18 UTC 2024
    - Last Modified: Mon Jan 01 05:12:47 UTC 2018
    - 2.8K bytes
    - Viewed (0)
  6. test/reflectmethod2.go

    // assigned to interfaces, but only if reflect.Type.MethodByName is
    // never used. Test it here.
    
    package main
    
    import reflect1 "reflect"
    
    var called = false
    
    type M int
    
    func (m M) UniqueMethodName() {
    	called = true
    }
    
    var v M
    
    type MyType interface {
    	MethodByName(string) (reflect1.Method, bool)
    }
    
    func main() {
    	var t MyType = reflect1.TypeOf(v)
    	m, _ := t.MethodByName("UniqueMethodName")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 11 21:19:20 UTC 2016
    - 719 bytes
    - Viewed (0)
  7. test/fixedbugs/issue65957.dir/main.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"reflect"
    )
    
    var s = []rune{0, 1, 2, 3}
    
    func main() {
    	m := map[any]int{}
    	k := reflect.New(reflect.ArrayOf(4, reflect.TypeOf(int32(0)))).Elem().Interface()
    	m[k] = 1
    	a.F()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 28 05:32:14 UTC 2024
    - 368 bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/testdata/deadcode/ifacemethod5.go

    // if the type is "indirectly" converted to an interface
    // using reflection with a method descriptor as intermediate.
    // However, it uses MethodByName() with a constant name of
    // a method to look up. This does not disable the DCE like
    // Method(0) does.
    
    package main
    
    import "reflect"
    
    type S int
    
    func (s S) M() { println("S.M") }
    
    type I interface{ M() }
    
    type T float64
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 01 15:07:26 UTC 2023
    - 777 bytes
    - Viewed (0)
  9. platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/schemaBuilder/ConfigureLambdaHandler.kt

        init {
            check(functionalInterface.java.isInterface)
            check(typeParameters.size <= 1) { "generic types with more than one type parameter are not supported" }
        }
    
        override fun getTypeConfiguredByLambda(type: KType): KType? =
            if (type.isSubtypeOf(starProjectedType)) type.arguments.firstOrNull()?.type ?: staticallyKnownConfiguredType else null
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Feb 02 10:53:44 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/plugin/pkg/audit/webhook/webhook_test.go

    		}
    
    		obj, _, err := t.serializer.Decode(body, nil, t.list.DeepCopyObject())
    		if err != nil {
    			return fmt.Errorf("decode request body: %v", err)
    		}
    		if reflect.TypeOf(obj).Elem() != reflect.TypeOf(t.list).Elem() {
    			return fmt.Errorf("expected %T, got %T", t.list, obj)
    		}
    		t.onEvents(obj)
    		return nil
    	}()
    
    	if err == nil {
    		io.WriteString(w, "{}")
    		return
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 08 06:37:26 UTC 2022
    - 3.9K bytes
    - Viewed (0)
Back to top