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
fun).

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
regex.

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

is(validate_roman('XVII'),1);
is(validate_roman('CXXIII'),1);

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

isnt(validate_roman('LL'),1);

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?


Regards,

jac

(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 <[EMAIL PROTECTED]>
Telbit - Tecnologias de InformaÃÃo

Reply via email to