Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestReplaceGrow (0.22 sec)

  1. src/slices/slices_test.go

    	} {
    		ss, vv := Clone(test.s), Clone(test.v)
    		if !panics(func() { _ = Replace(ss, test.i, test.j, vv...) }) {
    			t.Errorf("Replace %s: should have panicked", test.name)
    		}
    	}
    }
    
    func TestReplaceGrow(t *testing.T) {
    	// When Replace needs to allocate a new slice, we want the original slice
    	// to not be changed.
    	a, b, c, d, e, f := 1, 2, 3, 4, 5, 6
    	mem := []*int{&a, &b, &c, &d, &e, &f}
    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