Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testSliceSetElement (0.24 sec)

  1. src/cmd/compile/internal/test/testdata/array_test.go

    			t.Errorf("#%d a[%d:%d][%d] = %d, wanted %d", i, test.i, test.j, test.p, got, test.want)
    		}
    	}
    }
    
    //go:noinline
    func testSliceSetElement_ssa(a *[10]int, i, j, p, x int) {
    	(*a)[i:j][p] = x
    }
    
    func testSliceSetElement(t *testing.T) {
    	a := [10]int{0, 10, 20, 30, 40, 50, 60, 70, 80, 90}
    	tests := [...]struct {
    		i, j, p int
    		want    int // a[i:j][p]
    	}{
    		{0, 10, 2, 17},
    		{0, 5, 4, 11},
    		{5, 10, 3, 28},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 3.1K bytes
    - Viewed (0)
Back to top