Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 500 for reflect2 (0.1 sec)

  1. schema/callbacks_test.go

    	}
    
    	for _, str := range []string{"BeforeSave", "AfterCreate"} {
    		if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    			t.Errorf("%v should be true", str)
    		}
    	}
    
    	for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} {
    		if reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 939 bytes
    - Viewed (0)
  2. schema/serializer.go

    	switch v := fieldValue.(type) {
    	case int64, int, uint, uint64, int32, uint32, int16, uint16:
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	case *int64, *int, *uint, *uint64, *int32, *uint32, *int16, *uint16:
    		if rv.IsZero() {
    			return nil, nil
    		}
    		result = time.Unix(reflect.Indirect(rv).Int(), 0).UTC()
    	default:
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jun 20 08:45:38 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. clause/expression.go

    		case map[string]interface{}:
    			for k, v := range value {
    				namedMap[k] = v
    			}
    		default:
    			var appendFieldsToMap func(reflect.Value)
    			appendFieldsToMap = func(reflectValue reflect.Value) {
    				reflectValue = reflect.Indirect(reflectValue)
    				switch reflectValue.Kind() {
    				case reflect.Struct:
    					modelType := reflectValue.Type()
    					for i := 0; i < modelType.NumField(); i++ {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Oct 10 06:45:48 UTC 2023
    - 8.3K bytes
    - Viewed (0)
  4. tests/preload_suits_test.go

    	}
    
    	if len(got) != 2 {
    		t.Errorf("got %v items, expected 2", len(got))
    	}
    
    	if !reflect.DeepEqual(got[0], want) && !reflect.DeepEqual(got[1], want) {
    		t.Fatalf("got %s; want array containing %s", toJSONString(got), toJSONString(want))
    	}
    
    	if !reflect.DeepEqual(got[0], want2) && !reflect.DeepEqual(got[1], want2) {
    		t.Errorf("got %s; want array containing %s", toJSONString(got), toJSONString(want2))
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Mar 18 05:38:46 UTC 2022
    - 30.3K bytes
    - Viewed (0)
  5. schema/constraint_test.go

    		}
    
    		for _, name := range []string{"Name", "Constraint"} {
    			if reflect.ValueOf(result).FieldByName(name).Interface() != reflect.ValueOf(v).FieldByName(name).Interface() {
    				t.Errorf(
    					"check %v %v should equal, expects %v, got %v",
    					k, name, reflect.ValueOf(result).FieldByName(name).Interface(), reflect.ValueOf(v).FieldByName(name).Interface(),
    				)
    			}
    		}
    	}
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Sun Feb 04 07:49:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/collect/WriteReplaceOverridesTest.java

    import static java.lang.reflect.Modifier.PRIVATE;
    import static java.lang.reflect.Modifier.PROTECTED;
    import static java.lang.reflect.Modifier.PUBLIC;
    import static java.util.Arrays.asList;
    
    import com.google.common.base.Optional;
    import com.google.common.reflect.ClassPath;
    import com.google.common.reflect.ClassPath.ClassInfo;
    import com.google.common.reflect.TypeToken;
    import java.lang.reflect.Method;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jul 24 18:53:31 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  7. callbacks/helper.go

    		}
    		return
    	}
    }
    
    type visitMap = map[reflect.Value]bool
    
    // Check if circular values, return true if loaded
    func loadOrStoreVisitMap(visitMap *visitMap, v reflect.Value) (loaded bool) {
    	if v.Kind() == reflect.Ptr {
    		v = v.Elem()
    	}
    
    	switch v.Kind() {
    	case reflect.Slice, reflect.Array:
    		loaded = true
    		for i := 0; i < v.Len(); i++ {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Apr 14 12:32:57 UTC 2022
    - 3.7K bytes
    - Viewed (0)
  8. utils/utils.go

    		}
    	}
    	return false
    }
    
    func AssertEqual(x, y interface{}) bool {
    	if reflect.DeepEqual(x, y) {
    		return true
    	}
    	if x == nil || y == nil {
    		return false
    	}
    
    	xval := reflect.ValueOf(x)
    	yval := reflect.ValueOf(y)
    	if xval.Kind() == reflect.Ptr && xval.IsNil() ||
    		yval.Kind() == reflect.Ptr && yval.IsNil() {
    		return false
    	}
    
    	if valuer, ok := x.(driver.Valuer); ok {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  9. cmd/server-startup-msg_test.go

    	newAPIEndpoints := stripStandardPorts(apiEndpoints, "")
    
    	if !reflect.DeepEqual(expectedAPIEndpoints, newAPIEndpoints) {
    		t.Fatalf("Expected %#v, got %#v", expectedAPIEndpoints, newAPIEndpoints)
    	}
    
    	apiEndpoints = []string{"http://%%%%%:9000"}
    	newAPIEndpoints = stripStandardPorts(apiEndpoints, "")
    	if !reflect.DeepEqual(apiEndpoints, newAPIEndpoints) {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 12 20:51:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  10. internal/event/targetidset_test.go

    	}
    
    	for i, testCase := range testCases {
    		result := testCase.set.Clone()
    
    		if !reflect.DeepEqual(result, testCase.set) {
    			t.Fatalf("test %v: result: expected: %v, got: %v", i+1, testCase.set, result)
    		}
    
    		result.add(testCase.targetIDToAdd)
    		if reflect.DeepEqual(result, testCase.set) {
    			t.Fatalf("test %v: result: expected: not equal, got: equal", i+1)
    		}
    	}
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 3.9K bytes
    - Viewed (0)
Back to top