On Wed, Jun 21, 2006 at 09:18:10PM +1000, O Plameras wrote: > Matthew Palmer wrote: > >On Wed, Jun 21, 2006 at 05:47:10PM +1000, O Plameras wrote: > >>The above tests appear to be incosistent and therefore the TEST are > >>incorrect. You seem to say to round to the nearest UNIT and later on say > >>to round to the nearest HUNDRETH UNIT. > >> > >>In practice there should be a consistent rule for rounding like, the > >>nearest UNIT, or TENTHS, or HUNDRETH, for all numbers and not a mixture. > > > >The customer's needs were quite explicit that the rounding was not > >consistent between positive and negative numbers. > > Are'nt you misleading the audience of this list?
No comment. > Secondly, how do you reconcile your specs as follows: > > >class SimpleBodgyRoundingTest < Test::Unit::TestCase > > def test_bodgy_rounding > > assert_equal(10, bodgy_rounding(12)) > > Your bodgy_rounding(12) should send ONLY ONE parameter, > that is integer 10 in the above to satisfy the TEST, > and now you are saying bodgy_rounding should return > TWO PARAMETERS ? There's two separate test suites -- the first is a test for a simple version of bodgy_rounding() which handles both positive and negative numbers, and the second is an extension to that method to return two parameters. > Is'nt this a parody of stupidity ? You've got the wrong pronoun there. - Matt _______________________________________________ coders mailing list [email protected] http://lists.slug.org.au/listinfo/coders
