Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for 42 (0.11 sec)

  1. src/bytes/bytes_test.go

    	}
    }
    
    func TestClone(t *testing.T) {
    	var cloneTests = [][]byte{
    		[]byte(nil),
    		[]byte{},
    		Clone([]byte{}),
    		[]byte(strings.Repeat("a", 42))[:0],
    		[]byte(strings.Repeat("a", 42))[:0:0],
    		[]byte("short"),
    		[]byte(strings.Repeat("a", 42)),
    	}
    	for _, input := range cloneTests {
    		clone := Clone(input)
    		if !Equal(clone, input) {
    			t.Errorf("Clone(%q) = %q; want %q", input, clone, input)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top