|
From: Darren C. <da...@dc...> - 2006-05-27 21:52:19
|
> but I have to confess that the only assertion I really use is assertTrue. > Occasionally, I've found assertNull and assertFalse useful... I think assertEqual is more useful than assertTrue as you are able to tell the framework more information. And that means it can give you a more useful error message. E.g. assertTrue(Math.PI=3.14); assertEqual(Math.PI,3.14): All the first one can say is "it is false". The second one can say "3.14 is not equal to 3.1415932142143" (or whatever PI actually is :-). That means I get to see exactly what the bug is, immediately. Also, after my recent patch, assertEqual is also more useful in that it compares arrays and objects (and recursively); something you cannot do with assertTrue and either == or ===. Darren , but the > overwhelming majority of my test cases have nothing but a bunch of > assertTrue statements. As an example, our latest project has 607 instances > of the "assertTrue" string. > > I guess this why we went out and bought the domain... > > http://www.asserttrue.com > > Does anyone else do this? Or is this just another way in which I'm kind of > strange? > > ;-) > > > Luke > www.asunit.org > > > ------------------------------------------------------------------------ > > _______________________________________________ > Asunit-users mailing list > Asu...@li... > https://lists.sourceforge.net/lists/listinfo/asunit-users |