- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 296 for numfield (0.22 sec)
-
src/net/http/h2_error.go
return false } src := reflect.ValueOf(e) srcType := src.Type() numField := srcType.NumField() if dstType.NumField() != numField { return false } for i := 0; i < numField; i++ { sf := srcType.Field(i) df := dstType.Field(i) if sf.Name != df.Name || !sf.Type.ConvertibleTo(df.Type) { return false } } for i := 0; i < numField; i++ { df := dst.Field(i) df.Set(src.Field(i).Convert(df.Type())) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:27 UTC 2023 - 812 bytes - Viewed (0) -
src/internal/unsafeheader/unsafeheader_test.go
} if f.Offset != rf.Offset { t.Errorf("%v.%s has offset %d, but %v.%s has offset %d", h, f.Name, f.Offset, rh, rf.Name, rf.Offset) } } if h.NumField() != rh.NumField() { t.Errorf("%v has %d fields, but %v has %d", h, h.NumField(), rh, rh.NumField()) } if h.Align() != rh.Align() { t.Errorf("%v has alignment %d, but %v has alignment %d", h, h.Align(), rh, rh.Align()) } } var (
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 13 18:45:54 UTC 2021 - 2.9K bytes - Viewed (0) -
staging/src/k8s.io/api/core/v1/types_test.go
func TestEphemeralContainer(t *testing.T) { ephemeralType := reflect.TypeOf(EphemeralContainerCommon{}) containerType := reflect.TypeOf(Container{}) ephemeralFields := ephemeralType.NumField() containerFields := containerType.NumField() if containerFields != ephemeralFields { t.Fatalf("%v has %d fields, %v has %d fields", ephemeralType, ephemeralFields, containerType, containerFields) } for i := 0; i < ephemeralFields; i++ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 20 03:01:07 UTC 2021 - 2.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authorization/cel/compile_test.go
if len(requestDeclType.Fields) != requestType.NumField() { t.Fatalf("expected %d fields for SubjectAccessReviewSpec, got %d", requestType.NumField(), len(requestDeclType.Fields)) } resourceAttributesDeclType := buildResourceAttributesType(f, fs) resourceAttributeType := reflect.TypeOf(v1.ResourceAttributes{}) if len(resourceAttributesDeclType.Fields) != resourceAttributeType.NumField() {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 5.9K bytes - Viewed (0) -
pkg/apis/core/types_test.go
func TestEphemeralContainer(t *testing.T) { ephemeralType := reflect.TypeOf(EphemeralContainerCommon{}) containerType := reflect.TypeOf(Container{}) ephemeralFields := ephemeralType.NumField() containerFields := containerType.NumField() if containerFields != ephemeralFields { t.Fatalf("%v has %d fields, %v has %d fields", ephemeralType, ephemeralFields, containerType, containerFields) } for i := 0; i < ephemeralFields; i++ {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Oct 20 03:01:07 UTC 2021 - 1.4K bytes - Viewed (0) -
utils/tests/utils.go
return } } if reflect.ValueOf(got).Kind() == reflect.Struct { if reflect.ValueOf(expect).Kind() == reflect.Struct { if reflect.ValueOf(got).NumField() == reflect.ValueOf(expect).NumField() { exported := false for i := 0; i < reflect.ValueOf(got).NumField(); i++ { if fieldStruct := reflect.ValueOf(got).Type().Field(i); ast.IsExported(fieldStruct.Name) { exported = true
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Fri Mar 10 09:21:56 UTC 2023 - 3.9K bytes - Viewed (0) -
src/time/tzdata_test.go
// The tx field changes faster as tzdata is updated. // The cache fields are expected to differ. v1 := reflect.ValueOf(ref).Elem() v2 := reflect.ValueOf(sample).Elem() typ := v1.Type() nf := typ.NumField() found := 0 for i := 0; i < nf; i++ { ft := typ.Field(i) if ft.Name != "name" && ft.Name != "zone" { continue } found++ if !equal(t, v1.Field(i), v2.Field(i)) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 18 20:57:35 UTC 2022 - 2.5K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/authentication/cel/compile_test.go
userDeclType := buildUserType() userType := reflect.TypeOf(authenticationv1.UserInfo{}) if len(userDeclType.Fields) != userType.NumField() { t.Errorf("expected %d fields, got %d", userType.NumField(), len(userDeclType.Fields)) } for i := 0; i < userType.NumField(); i++ { field := userType.Field(i) jsonTagParts := strings.Split(field.Tag.Get("json"), ",") if len(jsonTagParts) < 1 {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 10 22:07:40 UTC 2024 - 7.3K bytes - Viewed (0) -
staging/src/k8s.io/api/networking/v1/types_test.go
// protobuf field numbers are not accidentally reused by other fields. func Test_NetworkPolicyRemovedFieldProtobufNumberReservation(t *testing.T) { obj := reflect.ValueOf(NetworkPolicy{}).Type() for i := 0; i < obj.NumField(); i++ { f := obj.Field(i) protobufSpec := f.Tag.Get("protobuf") if protobufSpec == "" { continue } protobufNum := strings.Split(protobufSpec, ",")[1] if protobufNum == "3" {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Mon May 01 18:19:25 UTC 2023 - 1.3K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/validation_test.go
} } // check that anything other than name and generateName of ObjectMeta in metadata properties is forbidden tt := reflect.TypeOf(metav1.ObjectMeta{}) for i := 0; i < tt.NumField(); i++ { property := tt.Field(i).Name s := &Structural{ Generic: Generic{ Type: "object", }, Properties: map[string]Structural{ property: {}, }, }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri May 31 18:20:00 UTC 2024 - 11.6K bytes - Viewed (0)