On Sunday, July 25, 2004, 6:50:53 AM, Alexey wrote: > Ruby is amazing... Try to do this in Java (it is possible, but not in so > concise and readable way). > [...] > expectedResults = {-5 => 25, -1 => 1, 0 => 0, 1 => 1, 10 => 100, 999999999 =>> 999999998000000001} > expectedResults.each_pair do |parameter, expectedResult| > ParaTest.module_eval <<-EOL > def testSquareOf#{parameter.to_s.sub('-', 'Minus')} > assert_equal #{expectedResult}, > ClassUnderTest.new.square(#{parameter}) > end > EOL > end Nifty, but I'd actually prefer to put all those tests in the one method in cases like that. Cheers, Gavin