[Mono-list] Question about testing

Paolo Molaro lupus@ximian.com
Fri, 26 Jul 2002 15:02:03 +0200


On 07/26/02 J. Perkins wrote:
> I need to implement the 'Environment.OSVersion' getter in corlib.
> So I read through the contribution howto, and all about testing,
> but I'm little uncertain how to test this particular function.
> In order to for the test to determine the expected return values,
> it has to know what OS it's running on. In order to determine the
> OS, it will have to run exactly the same code as the getter it is
> supposed to be testing. So if getter is broken, the test will be
> broken too! Any suggestions on how to proceed?

I this case I would just check that OSVersion returns a non-null value.

> Of course, I still haven't been able to build corlib on my own
> box yet, so first things first.

Care to share details of the problems?
You should be able to build corlib in two ways:
1) using csc (simply run make in the mcs/class dir)
2) using mcs _with the mono runtime_ (the MS implementation of
Reflection.Emit cannot be used to build a corlib-type library)

lupus

-- 
-----------------------------------------------------------------
lupus@debian.org                                     debian/rules
lupus@ximian.com                             Monkeys do it better