Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 479 for got (8.83 sec)

  1. tests/callbacks_test.go

    func assertCallbacks(v interface{}, fnames []string) (result bool, msg string) {
    	var (
    		got   []string
    		funcs = reflect.ValueOf(v).Elem().FieldByName("fns")
    	)
    
    	for i := 0; i < funcs.Len(); i++ {
    		got = append(got, getFuncName(funcs.Index(i)))
    	}
    
    	return fmt.Sprint(got) == fmt.Sprint(fnames), fmt.Sprintf("expects %v, got %v", fnames, got)
    }
    
    func getFuncName(fc interface{}) string {
    	reflectValue, ok := fc.(reflect.Value)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Mar 26 03:33:36 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  2. tests/connpool_test.go

    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.QueryContext(ctx, query, args...)
    }
    
    func (c *wrapperTx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row {
    	c.conn.got = append(c.conn.got, query)
    	return c.Tx.QueryRowContext(ctx, query, args...)
    }
    
    type wrapperConnPool struct {
    	db     *sql.DB
    	got    []string
    	expect []string
    }
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Feb 06 02:54:40 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  3. tests/hooks_test.go

    		t.Errorf("should got failed to save, but error is nil")
    	}
    
    	if DB.First(&Product4{}, "name = ?", product.Name).Error == nil {
    		t.Errorf("should got RecordNotFound, but got nil")
    	}
    
    	product = Product4{Name: "Product-2", Price: 100, Item: ProductItem{Code: "valid"}}
    	if err := DB.Create(&product).Error; err != nil {
    		t.Errorf("should create product, but got error %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
  4. schema/naming_test.go

    		t.Errorf("invalid index name generated, got %v", idxName)
    	}
    
    	chkName := ns.CheckerName("public.table", "name")
    	if chkName != "chk_public_table_name" {
    		t.Errorf("invalid checker name generated, got %v", chkName)
    	}
    
    	joinTable := ns.JoinTableName("user_languages")
    	if joinTable != "public.user_languages" {
    		t.Errorf("invalid join table generated, got %v", joinTable)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue May 30 02:00:48 GMT 2023
    - 7K bytes
    - Viewed (0)
  5. tests/group_by_test.go

    	}
    
    	if err := DB.Model(&User{}).Select("name, sum(age) as total").Where("name LIKE ?", "groupby%").Group("name").Having("name = ?", "groupby1").Row().Scan(&name, &total); err != nil {
    		t.Errorf("no error should happen, but got %v", err)
    	}
    
    	if name != "groupby1" || total != 660 {
    		t.Errorf("name should be groupby, but got %v, total should be 660, but got %v", name, total)
    	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  6. tests/table_test.go

    		if err != nil {
    			t.Fatalf("failed to parse user unique, got error %v", err)
    		}
    
    		constraints := user.ParseUniqueConstraints()
    		if len(constraints) != 1 {
    			t.Fatalf("failed to find unique constraint, got %v", constraints)
    		}
    
    		for key := range constraints {
    			if len(key) != 63 {
    				t.Errorf("failed to find unique constraint, got %v", constraints)
    			}
    		}
    	})
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Mar 09 09:31:28 GMT 2024
    - 10.6K bytes
    - Viewed (0)
  7. internal/hash/errors.go

    type SizeTooSmall struct {
    	Want int64
    	Got  int64
    }
    
    func (e SizeTooSmall) Error() string {
    	return fmt.Sprintf("Size small: got %d, want %d", e.Got, e.Want)
    }
    
    // SizeTooLarge reader size too large
    type SizeTooLarge struct {
    	Want int64
    	Got  int64
    }
    
    func (e SizeTooLarge) Error() string {
    	return fmt.Sprintf("Size large: got %d, want %d", e.Got, e.Want)
    }
    
    // SizeMismatch error size mismatch
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon May 15 21:08:54 GMT 2023
    - 2.4K bytes
    - Viewed (0)
  8. cmd/data-usage-cache_test.go

    				h.add(sz)
    			}
    			got := h.toMap()
    			exp := test.want
    			// what is in exp is in got
    			for k := range exp {
    				if exp[k] != got[k] {
    					t.Fatalf("interval %s: Expected %d values but got %d values\n", k, exp[k], got[k])
    				}
    			}
    			// what is absent in exp is absent in got too
    			for k := range got {
    				if _, ok := exp[k]; !ok && got[k] > 0 {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Jan 13 07:51:08 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  9. tests/associations_has_many_test.go

    		t.Errorf("expected %d contents, got %d", 3, count)
    	}
    
    	var contents []ItemContent
    	if err := tx.Find(&contents).Error; err != nil {
    		t.Errorf("failed to find contents, got error: %v", err)
    	}
    	if len(contents) != 3 {
    		t.Errorf("expected %d contents, got %d", 3, len(contents))
    	}
    
    	// test delete
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 15.6K bytes
    - Viewed (0)
  10. operator/cmd/mesh/test-util_test.go

    	node := actual.(map[string]any)
    	got, f, err := tpath.GetPathContext(node, util.PathFromString(pv.path), false)
    	if err != nil || !f {
    		return false, err
    	}
    	if reflect.TypeOf(got.Node) != reflect.TypeOf(pv.value) {
    		return false, fmt.Errorf("comparison types don't match: got %v(%T), want %v(%T)", got.Node, got.Node, pv.value, pv.value)
    	}
    	if !reflect.DeepEqual(got.Node, pv.value) {
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Tue Oct 31 14:48:28 GMT 2023
    - 15.3K bytes
    - Viewed (0)
Back to top