Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for testslice2 (0.52 sec)

  1. test/range.go

    	}
    }
    
    func main() {
    	testblankvars()
    	testchan()
    	testarray()
    	testarray1()
    	testarray2()
    	testarrayptr()
    	testarrayptr1()
    	testarrayptr2()
    	testslice()
    	testslice1()
    	testslice2()
    	testslice3()
    	teststring()
    	teststring1()
    	teststring2()
    	testmap()
    	testmap1()
    	testmap2()
    	testcalls()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 05:50:54 UTC 2017
    - 8.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/test/testdata/compound_test.go

    	}
    }
    
    func slice_ssa(a, b []byte, x bool) []byte {
    	var s []byte
    	if x {
    		s = a
    	} else {
    		s = b
    	}
    	return s
    }
    
    func testSlice(t *testing.T) {
    	a := []byte{3, 4, 5}
    	b := []byte{7, 8, 9}
    	if want, got := byte(3), slice_ssa(a, b, true)[0]; got != want {
    		t.Errorf("slice_ssa(%v, %v, true) = %v, want %v\n", a, b, got, want)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 2.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/testdata/slice_test.go

    // either the slice pointer or the capacity.
    // See issue #14855.
    
    package main
    
    import "testing"
    
    const N = 1000000
    
    type X struct {
    	s []int
    }
    
    func TestSlice(t *testing.T) {
    	done := make(chan struct{})
    	a := make([]int, N+10)
    
    	x := &X{a}
    
    	go func() {
    		for i := 0; i < N; i++ {
    			x.s = x.s[1:9]
    		}
    		done <- struct{}{}
    	}()
    	go func() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 23 06:40:04 UTC 2020
    - 850 bytes
    - Viewed (0)
  4. test/rangegen.go

    					code1 := gen(b, "testSlice"+s, "_, ", "slice2", i, double, func(c int) bool { return c == j || c == k })
    					if code0 != code1 {
    						panic("bad generator")
    					}
    					tests += "test" + s + "()\n"
    					p(b, testCode, "test"+s, []int{j, k}, "testFunc"+s, "testSlice"+s)
    					flush(false)
    				}
    			}
    		}
    	}
    	for i := 1; i <= max; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 23:35:19 UTC 2023
    - 8.4K bytes
    - Viewed (0)
Back to top