- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for TestDeleteFunc (0.16 sec)
-
src/maps/maps_test.go
if !Equal(mc, want) { t.Errorf("Copy result = %v, want %v", mc, want) } type M1 map[int]bool type M2 map[int]bool Copy(make(M1), make(M2)) } func TestDeleteFunc(t *testing.T) { mc := Clone(m1) DeleteFunc(mc, func(int, int) bool { return false }) if !Equal(mc, m1) { t.Errorf("DeleteFunc(%v, true) = %v, want %v", m1, mc, m1) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 05 17:05:56 UTC 2023 - 5.6K bytes - Viewed (0) -
src/slices/slices_test.go
}, { []int{1, 2, 3}, func(i int) bool { return i < 2 }, []int{2, 3}, }, { []int{10, 2, 30}, func(i int) bool { return i >= 10 }, []int{2}, }, } func TestDeleteFunc(t *testing.T) { for i, test := range deleteFuncTests { copy := Clone(test.s) if got := DeleteFunc(copy, test.fn); !Equal(got, test.want) { t.Errorf("DeleteFunc case %d: got %v, want %v", i, got, test.want)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 13:32:06 UTC 2024 - 33.2K bytes - Viewed (0)