- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 33 for _friend_ (0.1 sec)
-
tests/helper_test.go
} }) t.Run("Friends", func(t *testing.T) { if len(user.Friends) != len(expect.Friends) { t.Fatalf("Friends should equal, expect: %v, got %v", len(expect.Friends), len(user.Friends)) } sort.Slice(user.Friends, func(i, j int) bool { return user.Friends[i].ID > user.Friends[j].ID }) sort.Slice(expect.Friends, func(i, j int) bool {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
tests/associations_many2many_test.go
// Append friend := *GetUser("friend", Config{}) if err := DB.Model(&user2).Association("Friends").Append(&friend); err != nil { t.Fatalf("Error happened when append account, got %v", err) } user.Friends = append(user.Friends, &friend) CheckUser(t, user2, user) AssertAssociationCount(t, user, "Friends", 3, "AfterAppend")
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0) -
tests/update_many2many_test.go
DB.Create(&lang) } user.Friends = []*User{{Name: "friend-1"}, {Name: "friend-2"}} if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Languages").Preload("Friends").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) for idx := range user.Friends { user.Friends[idx].Name += "new" }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 1.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/SetOperationsTest.java
Set<String> enemies = newHashSet("Dick", "Harry", "Tom"); Set<String> goodFriends = Sets.difference(friends, enemies); assertEquals(2, goodFriends.size()); ImmutableSet<String> immut = Sets.difference(friends, enemies).immutableCopy(); HashSet<String> mut = Sets.difference(friends, enemies).copyInto(new HashSet<String>()); enemies.add("Dave");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 14.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/SetOperationsTest.java
Set<String> enemies = newHashSet("Dick", "Harry", "Tom"); Set<String> goodFriends = Sets.difference(friends, enemies); assertEquals(2, goodFriends.size()); ImmutableSet<String> immut = Sets.difference(friends, enemies).immutableCopy(); HashSet<String> mut = Sets.difference(friends, enemies).copyInto(new HashSet<String>()); enemies.add("Dave");
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 14.5K bytes - Viewed (0) -
tests/create_test.go
*GetUser("bulk_5", Config{Account: false, Pets: 0, Toys: 3, Company: true, Manager: false, Team: 1, Languages: 3, Friends: 1}), *GetUser("bulk_6", Config{Account: true, Pets: 4, Toys: 3, Company: false, Manager: true, Team: 1, Languages: 3, Friends: 0}), *GetUser("bulk_7", Config{Account: true, Pets: 1, Toys: 3, Company: true, Manager: true, Team: 4, Languages: 3, Friends: 1}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0) -
docs_src/python_types/tutorial011.py
id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None friends: List[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user) # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] print(user.id)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 498 bytes - Viewed (0) -
docs_src/python_types/tutorial011_py39.py
id: int name: str = "John Doe" signup_ts: Union[datetime, None] = None friends: list[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user) # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] print(user.id)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 492 bytes - Viewed (0) -
docs_src/python_types/tutorial011_py310.py
id: int name: str = "John Doe" signup_ts: datetime | None = None friends: list[int] = [] external_data = { "id": "123", "signup_ts": "2017-06-01 12:22", "friends": [1, "2", b"3"], } user = User(**external_data) print(user) # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] print(user.id)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Sep 02 15:56:35 UTC 2023 - 461 bytes - Viewed (0) -
tests/update_test.go
result.Friends = append(user.Friends, result.Friends...) sort.Slice(result.Pets, func(i, j int) bool { return result.Pets[i].ID < result.Pets[j].ID }) sort.Slice(result.Team, func(i, j int) bool { return result.Team[i].ID < result.Team[j].ID }) sort.Slice(result.Friends, func(i, j int) bool { return result.Friends[i].ID < result.Friends[j].ID })
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0)