[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

Re: Design contracts and refactoring (was Re: mathn: ugly warnings)

From: Mathieu Bouchard <matju@...>
Date: 2006-01-14 04:36:16 UTC
List: ruby-core #7149
On Sat, 14 Jan 2006, Hugh Sasse wrote:
> On Sat, 14 Jan 2006, mathew wrote:
> > Consider '+'. Requirements are that it add any two things which constitute
> > numbers. Trouble is, you can't even test every possible pair of floating point
> > numbers, let alone the integers and rationals. Any test of N pairs that you do
> > will be statistically insignificant.
> You are not testing number theory, you are testing software.

You are testing "implementation" in general, not software in particular.  
This may include "+". The method for "+" is software, even though it uses
hardware. There's nothing saying that unit-tests can't (or shouldn't) test
hardware.

Actually it's very appropriate to write unit-tests for hardware, and very 
commonplace as well.

> Yes, you must test the brakes.  Yes you must calibrate the speedometer.  
> Software, except the Monte Carlo sort, is not statistical in nature.

You haven't computed a lot of Monte-Carlo integrals, have you? =)

  http://mathworld.wolfram.com/MonteCarloIntegration.html

> If one is expected to write tests for all types a generic method
> will support, then it is making a rod for one's own back.  There
> isn't time.

unit-tests don't have to be as flat as they are usually done. Try to write 
polymorphic tests.

 _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - t駘:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montr饌l QC Canada


In This Thread

Prev Next