Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSplitError (0.17 sec)

  1. src/bufio/scan_test.go

    		"opqrstuvwxyz",
    		"",
    	}
    	testNoNewline(text, lines, t)
    }
    
    var testError = errors.New("testError")
    
    // Test the correct error is returned when the split function errors out.
    func TestSplitError(t *testing.T) {
    	// Create a split function that delivers a little data, then a predictable error.
    	numSplits := 0
    	const okCount = 7
    	errorSplit := func(data []byte, atEOF bool) (advance int, token []byte, err error) {
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
Back to top