[Mono-list] Tests for System.BitConverter

Duco Fijma duco@lorentz.xs4all.nl
25 Feb 2002 23:24:02 +0100


Just committed a first version of a test for System.BitConverter. Its
coverage is far from complete, but the structure is there.
System.BitConverter  converts the simple types to and from arrays of
bytes. The documentation of the class does not specify what the value of
the resulting byte array should be. 

So, I'm now checking indirectly only: to check that if a value is
converted to a byte array and back again, the original value is
returned. I'm not sure whether it is needed to test against stronger
assumptions, using knowledge not directly from the documentation of the
class under test. Is it, for example, even specified somewhere that an
"int" should be stored as a 2-complement number in the four bytes it
occupies? And, if so, is that something that should be tested in this
place?

Duco