On Wed, Feb 01, 2012 at 10:31:51AM +0900, Yong Li wrote:
> 
> # process(Fixnum i) is supposed to return 100.0 * i
> # and I am going to test it
> assert_with_approx_equal( process(1.1), 110.0)
> # => oops, this fails, but I thought 100.0 * 1.1 == 110.0
> 
> that '110.0' Float literal is calculated by my brain without using
> computer, and I may naively claim that the process method is wrong,
> but actual it is this unit test which is wrong.

I understood that part.


> 
> does unit test qualify your "98% of the problem for 98% of casual use cases"?

I didn't understand that part.

-- 
Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]