From: <kea...@na...> - 2003-03-28 15:39:30
|
I stand corrected. EBR, you da man! Keats > -----Original Message----- > > I guess I was just lazy.=A0 There aren't any existing tests for the = =20 > > MathTool AFAICT.=A0 > > > > I don't know exactly how to do a test case for random() --=20 > since we =20 > > obviously don't know what the expected result is.=A0 I=20 > suppose I could =20 > > loop a bunch of times and make sure that all values=20 > returned are in =20 > > range and that all values in the range get returned, or I=20 > could just =20 > > compute the min/max/mean and check them.=A0 But this seems=20 > like overkill =20 > > for such a simple (one-line) method.=A0 >=20 > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/webmacro/webmac > ro/test/=20 > = unit/org/webmacro/util/TestMathTool.java?rev=3D1.2&content-type=3Dtext/ = > vnd.viewcvs-markup >=20 > it's been there since Nov. 2002 and does basically what you describe = > above. >=20 > eric >=20 |