Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/bufio/bufio_test.go

    	return 0, errors.New("writerWithReadFromError error")
    }
    
    func (w writerWithReadFromError) Write(b []byte) (n int, err error) {
    	return 10, nil
    }
    
    func TestWriterReadFromMustSetUnderlyingError(t *testing.T) {
    	var wr = NewWriter(writerWithReadFromError{})
    	if _, err := wr.ReadFrom(strings.NewReader("test2")); err == nil {
    		t.Fatal("expected ReadFrom returns error, got nil")
    	}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Fri Nov 01 21:52:12 UTC 2024
    - 51.6K bytes
    - Viewed (0)
Back to top