digitalmars.D - Unittest question
- Regan Heath (16/16) Jun 07 2004 What is the correct way to add a unittest for a class.. I did the
- Walter (1/1) Jun 07 2004 You can do it either way.
- Regan Heath (5/6) Jun 07 2004 Does it make any difference? Scoping? etc?
- Walter (3/7) Jun 07 2004 The scoping rules still apply.
What is the correct way to add a unittest for a class.. I did the
following:
class MD5 {
unittest {
auto MD5 m = new MD5();
m.reset();
m.process("");
assert(m.toString() == "d41d8cd98f00b204e9800998ecf8427e");
..etc..
but I note in the std.md5 source the unittest is coded at the end of the
file, at file scope.
std.md5 uses a struct and I have used a class, is that why? or have I done
it wrong?
Regan.
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jun 07 2004
On Mon, 7 Jun 2004 11:15:44 -0700, Walter <newshound digitalmars.com> wrote:You can do it either way.Does it make any difference? Scoping? etc? -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jun 07 2004
"Regan Heath" <regan netwin.co.nz> wrote in message news:opr88ux7pg5a2sq9 digitalmars.com...On Mon, 7 Jun 2004 11:15:44 -0700, Walter <newshound digitalmars.com> wrote:The scoping rules still apply.You can do it either way.Does it make any difference? Scoping? etc?
Jun 07 2004








"Walter" <newshound digitalmars.com>