Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestDeleteFunc (0.21 sec)

  1. 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)
Back to top