// TestWriterCommitErr checks that committing chunks can return an error.
TestWriterCommitErr checks that committing chunks can return an error.
// TestWriterCommitErr checks that committing chunks can return an error .
func TestWriterCommitErr(t *testing.T) {
	lim := limitWriter(4)
	w := NewWriter(&lim, 5)
	written, err := w.Commit()
	if written != 32 {
		t.Errorf(`written = %v, want 32`, written)
	}
	if err != io.EOF {
		t.Fatalf(`err = %v, want io.EOF`, err)
	}
}
func TestWriterCommitErr ( t * testing . T ) { lim := limitWriter ( 4 ) w := NewWriter ( & lim , 5 ) written , err := w . Commit ( ) if written != 32 { t . Errorf ( `written = %v, want 32` , written ) } if err != io . EOF { t . Fatalf ( `err = %v, want io.EOF` , err ) } }
TestWriterCommitErr checks that committing chunks can return an error.
TestWriterCommitErr checks that committing chunks can return an error .