Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestIndexByteSmall (0.18 sec)

  1. src/bytes/bytes_test.go

    			}
    			b1[j] = 0
    			pos = IndexByte(b1, 'x')
    			if pos != -1 {
    				t.Errorf("IndexByte(%q, 'x') = %v", b1, pos)
    			}
    		}
    	}
    }
    
    // test a small index across all page offsets
    func TestIndexByteSmall(t *testing.T) {
    	b := make([]byte, 5015) // bigger than a page
    	// Make sure we find the correct byte even when straddling a page.
    	for i := 0; i <= len(b)-15; i++ {
    		for j := 0; j < 15; j++ {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top