Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 69 for typeOf (0.35 sec)

  1. src/reflect/type_test.go

    		{"func(func(int, int))", reflect.TypeOf(func(func(int, int)) {}), false},
    		{"int64", reflect.TypeOf(int64(1)), false},
    		{"uint64", reflect.TypeOf(uint64(1)), false},
    		{"*[4]int", reflect.TypeOf(&[4]int{}), true},
    		{"chan int64", reflect.TypeOf(make(chan int64)), false},
    		{"map[int]int", reflect.TypeOf(make(map[int]int)), true},
    		{"string", reflect.TypeOf(""), true},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 23:39:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. src/internal/fmtsort/sort_test.go

    )
    
    var compareTests = [][]reflect.Value{
    	ct(reflect.TypeOf(int(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int8(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int16(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int32(0)), -1, 0, 1),
    	ct(reflect.TypeOf(int64(0)), -1, 0, 1),
    	ct(reflect.TypeOf(uint(0)), 0, 1, 5),
    	ct(reflect.TypeOf(uint8(0)), 0, 1, 5),
    	ct(reflect.TypeOf(uint16(0)), 0, 1, 5),
    	ct(reflect.TypeOf(uint32(0)), 0, 1, 5),
    	ct(reflect.TypeOf(uint64(0)), 0, 1, 5),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 6.9K bytes
    - Viewed (0)
  3. platforms/core-execution/execution/src/main/java/org/gradle/internal/execution/model/annotations/AbstractInputPropertyAnnotationHandler.java

            Class<?> returnType = propertyMetadata.getDeclaredType().getRawType();
            if (Provider.class.isAssignableFrom(returnType)) {
                List<TypeOf<?>> typeArguments = TypeOf.typeOf(propertyMetadata.getDeclaredType().getType()).getActualTypeArguments();
                for (TypeOf<?> typeArgument : typeArguments) {
                    unpackedValueTypes.add(typeArgument.getConcreteClass());
                }
            } else {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:33 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go

    	switch nativeType {
    	case reflect.TypeOf(""):
    		return apiservercel.StringType
    	case reflect.TypeOf([]string{}):
    		return apiservercel.NewListType(apiservercel.StringType, -1)
    	case reflect.TypeOf(map[string]v1.ExtraValue{}):
    		return apiservercel.NewMapType(apiservercel.StringType, apiservercel.NewListType(apiservercel.StringType, -1), -1)
    	case reflect.TypeOf(&v1.ResourceAttributes{}):
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  5. platforms/core-configuration/declarative-dsl-core/src/test/kotlin/org/gradle/internal/declarativedsl/analysis/PropertyTest.kt

            val schema = schemaFromTypes(
                MyReceiver::class,
                listOf(MyReceiver::class),
                propertyExtractor = testPropertyContributor(expectedName, typeOf<Int>()) + testPropertyContributor(expectedName, typeOf<String>())
            )
    
            val property = schema.dataClassesByFqName[DefaultFqName.parse(MyReceiver::class.qualifiedName!!)]!!.properties.single()
            assertEquals(expectedName, property.name)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 14 10:08:01 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/authentication/cel/compile_test.go

    		}
    		if nativeTypeToCELType(t, field.Type).CelType().Equal(declField.Type.CelType()).Value() != true {
    			t.Errorf("expected field %q to have type %v, got %v", field.Name, field.Type, declField.Type)
    		}
    	}
    }
    
    func nativeTypeToCELType(t *testing.T, nativeType reflect.Type) *apiservercel.DeclType {
    	switch nativeType {
    	case reflect.TypeOf(""):
    		return apiservercel.StringType
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  7. pkg/config/schema/codegen/templates/collections.go.tmpl

    			},
    			{{- end}}
    			Proto: "{{ .Resource.Proto }}",
    			{{- if ne .Resource.StatusProto "" }}StatusProto: "{{ .Resource.StatusProto }}",{{end}}
    			ReflectType: reflect.TypeOf(&{{.ClientImport}}.{{.SpecType}}{}).Elem(),
    			{{- if ne .StatusType "" }}StatusType: reflect.TypeOf(&{{.StatusImport}}.{{.StatusType}}{}).Elem(), {{end}}
    			ProtoPackage: "{{ .Resource.ProtoPackage }}",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  8. src/errors/wrap.go

    // As(target) returns true. In the latter case, the As method is responsible for
    // setting target.
    //
    // An error type might provide an As method so it can be treated as if it were a
    // different error type.
    //
    // As panics if target is not a non-nil pointer to either a type that implements
    // error, or to any interface type.
    func As(err error, target any) bool {
    	if err == nil {
    		return false
    	}
    	if target == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 17:13:04 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. src/unique/clone_test.go

    }
    
    func testCloneSeq[T any](t *testing.T, want cloneSeq) {
    	typName := reflect.TypeFor[T]().Name()
    	typ := abi.TypeOf(*new(T))
    	t.Run(typName, func(t *testing.T) {
    		got := makeCloneSeq(typ)
    		if !reflect.DeepEqual(got, want) {
    			t.Errorf("unexpected cloneSeq for type %s: got %#v, want %#v", typName, got, want)
    		}
    	})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:14:07 UTC 2024
    - 1K bytes
    - Viewed (0)
  10. src/runtime/sizeof_test.go

    	var tests = []struct {
    		val    any     // type as a value
    		_32bit uintptr // size on 32bit platforms
    		_64bit uintptr // size on 64bit platforms
    	}{
    		{runtime.G{}, 272, 432},   // g, but exported for testing
    		{runtime.Sudog{}, 56, 88}, // sudog, but exported for testing
    	}
    
    	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: Mon Apr 22 22:07:41 UTC 2024
    - 892 bytes
    - Viewed (0)
Back to top