[Mono-list] Re: A NUnit test with System.IO.BinaryReader
Dick Porter
dick@ximian.com
19 Aug 2002 22:50:40 +0100
On Mon, 2002-08-19 at 21:03, Eduardo Garcia wrote:
> El sáb, 17-08-2002 a las 21:37, Dick Porter escribió:
> > Now try testing a few interleaved r.BaseStream.Seek() :) Serge noted
> > some problems with character encodings too.
> >
> I don't know if you mean that with "interleaved r.BaseStream.Seek()" but
> i have write 2 more tests.
I mean:
given a stream consisting of 3 ints:
01 00 00 00 02 00 00 00 03 00 00 00
Assume the file pointer is at 0.
ReadInt32() returns 1
BaseStream.Seek(4, SeekOrigin.Current)
ReadInt32() returns 3
BaseStream.Seek(4, SeekOrigin.Begin)
ReadInt32() returns 2
etc..
- Dick