develooper Front page | perl.module-authors | Postings from May 2004

too many tests?

Thread Previous | Thread Next
Jose Alves de Castro
May 5, 2004 04:20
too many tests?
Message ID:
Yesterday, just for fun, I coded a module to convert between arabic and
roman numbers (I know there are quite a few, but hey, it was just for

Once I was done, I couldn't contend myself and I coded a function to
validate if a roman number is indeed a roman number... I did that with a

Now... wanting to test that function, I did some (1) tests like:


But I just couldn't stop there... I had to test things like:


So what I did was generate all possibles combinations of qw(M D C L X V
I) up to 6 chars, remove the good ones and test them up...

This works fine up to 5 char combinations... but when you get to the
over 900.000 tests for the 6 char ones... argh ;-\

My computer simply froze (2)... and a message stating something like
"Enormous test number seen" kept displaying.

So... is this normal? How would you normally test this kind of thing?



(1) - Actually, not just "some"... I tested everything from 1 to 5000

(2) - I managed to do those tests by separating them in different files 

José Alves de Castro <>
Telbit - Tecnologias de Informação

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About