Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for deepEqual (0.18 sec)

  1. utils/utils.go

    }
    
    func Contains(elems []string, elem string) bool {
    	for _, e := range elems {
    		if elem == e {
    			return true
    		}
    	}
    	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() ||
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 22 06:43:02 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  2. utils/tests/utils.go

    		expect := ev.FieldByName(name).Interface()
    		t.Run(name, func(t *testing.T) {
    			AssertEqual(t, got, expect)
    		})
    	}
    }
    
    func AssertEqual(t *testing.T, got, expect interface{}) {
    	if !reflect.DeepEqual(got, expect) {
    		isEqual := func() {
    			if curTime, ok := got.(time.Time); ok {
    				format := "2006-01-02T15:04:05Z07:00"
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Mar 10 09:21:56 GMT 2023
    - 3.9K bytes
    - Viewed (0)
Back to top