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