- Sort Score
- Result 10 results
- Languages All
Results 871 - 880 of 880 for assertEquals (0.19 sec)
-
utils/utils.go
} return strings.Join(results, "_") } 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)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:03:42 UTC 2024 - 4.1K bytes - Viewed (0) -
tests/embedded_struct_test.go
Name string } DB.Migrator().DropTable(&EmbeddedTag{}) err := DB.Migrator().AutoMigrate(&EmbeddedTag{}) AssertEqual(t, err, nil) t1 := EmbeddedTag{Name: "embedded_tag"} err = DB.Save(&t1).Error AssertEqual(t, err, nil) if t1.Tag1.Id == 0 { t.Errorf("embedded struct's primary field should be rewritten") }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed May 08 04:07:58 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/associations_belongs_to_test.go
tx.Config.DisableForeignKeyConstraintWhenMigrating = true AssertEqual(t, DB.Config.DisableForeignKeyConstraintWhenMigrating, false) tx.Migrator().DropTable(&BelongsToUser{}, &Org{}) tx.AutoMigrate(&BelongsToUser{}, &Org{}) user := &BelongsToUser{ Org: Org{ ID: "BelongsToUser_Org_1", }, } err := DB.Create(&user).Error AssertEqual(t, err, nil) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
tensorflow/c/c_api_function_test.cc
ASSERT_EQ(TF_OK, TF_GetCode(s_)) << TF_Message(s_); if (GetName(funcs[0]) == GetName(func0)) { AssertEqual(func0, funcs[0]); AssertEqual(func1, funcs[1]); } else { AssertEqual(func0, funcs[1]); AssertEqual(func1, funcs[0]); } TF_DeleteFunction(funcs[0]); TF_DeleteFunction(funcs[1]); TF_DeleteFunction(func0);
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Thu Jul 20 22:08:54 UTC 2023 - 63.6K bytes - Viewed (0) -
tests/table_test.go
t.Errorf("Table with escape character, got %v", r.Statement.SQL.String()) } AssertEqual(t, r.Statement.Vars, []interface{}{2, 4, 1, 3}) } func TestTableWithAllFields(t *testing.T) { dryDB := DB.Session(&gorm.Session{DryRun: true, QueryFields: true})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Mar 09 09:31:28 UTC 2024 - 10.6K bytes - Viewed (0) -
tests/hooks_test.go
if product.Name != "Product New3" || product.Price != 220 || product.Code != "L1213" { t.Errorf("invalid data after update, got %+v", product) } var result Product3 DB.First(&result, product.ID) AssertEqual(t, result, product) // Select to change Code, but nothing updated, price should not change DB.Model(&product).Select("code").Updates(Product3{Name: "L1214", Code: "L1213"})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0) -
schema/schema_helper_test.go
for k, v := range values { t.Run("CheckField/"+k, func(t *testing.T) { fv, _ := s.FieldsByDBName[k].ValueOf(context.Background(), value) tests.AssertEqual(t, v, fv) }) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Dec 15 08:31:23 UTC 2023 - 7.5K bytes - Viewed (0) -
tests/delete_test.go
DB.Table("deleted_users").Create(&user) var result UserWithDelete if err := DB.Table("deleted_users").First(&result).Error; err != nil { t.Errorf("failed to find deleted user, got error %v", err) } AssertEqual(t, result, user) if err := DB.Table("deleted_users").Delete(&result).Error; err != nil { t.Errorf("failed to delete user, got error %v", err) } var result2 UserWithDelete
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
tests/scanner_valuer_test.go
} if err := DB.Model(&data).Update("password", EncryptedData("newpass")).Error; err != nil { t.Errorf("Should got no error update data with valid data, but got %v", err) } AssertEqual(t, data.Password, EncryptedData("newpass")) } type ScannerValuerStruct struct { gorm.Model Name sql.NullString Gender *sql.NullString Age sql.NullInt64
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 07 07:02:07 UTC 2023 - 10.6K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 12.8K bytes - Viewed (0)