Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/bytes/bytes_test.go

    	{"\xc0☺\xc0", not(isValidRune), 0, 4},
    	{"\xc0☺\xc0\xc0", not(isValidRune), 0, 5},
    	{"ab\xc0a\xc0cd", not(isValidRune), 2, 4},
    	{"a\xe0\x80cd", not(isValidRune), 1, 2},
    }
    
    func TestIndexFunc(t *testing.T) {
    	for _, tc := range indexFuncTests {
    		first := IndexFunc([]byte(tc.in), tc.f.f)
    		if first != tc.first {
    			t.Errorf("IndexFunc(%q, %s) = %d; want %d", tc.in, tc.f.name, first, tc.first)
    		}
    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