Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestCloseOnWriter (0.3 sec)

  1. internal/ioutil/ioutil_test.go

    		t.Errorf("DeadlineWriter should succeed but failed with %s", err)
    	}
    	if n != 4 {
    		t.Errorf("DeadlineWriter should succeed but should have only written 4 bytes, but returned %d instead", n)
    	}
    }
    
    func TestCloseOnWriter(t *testing.T) {
    	writer := WriteOnClose(io.Discard)
    	if writer.HasWritten() {
    		t.Error("WriteOnCloser must not be marked as HasWritten")
    	}
    	writer.Write(nil)
    	if !writer.HasWritten() {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 11:02:31 GMT 2024
    - 5.1K bytes
    - Viewed (0)
Back to top