Hi there,

I'm writing some tests to check ktj_decode (for fun, basically) and
found a small issue: if you try to decode something like "0.1E310",
ktuo fails with a badarg calling list_to_float.

That's not an error itself, but since I'm generating test cases
randomly using QuickCheck and a yecc grammar I'd like to recognise
this error as a known case. However, wrapping the test around a
try/catch catching all badargs is clearly a bad idea, that can shade
many legitimate errors.

What I did was a small modification in ktuo_parse_tools to throw a
more specific error in that case so that I can catch it in my testing
suite.

Ktuo patch:

https://github.com/samuelrivas/ktuo/commit/8e4ed6588d7df9f34f23b2557a45fcb7abce73a3

The adaptation in the testing suite:

https://github.com/samuelrivas/cushion_tests/commit/1998351477db9eb9623715e01017953a208dc66c

Any objections to the ktuo patch? I'm not asking to upload it to
mainstream yet, since I have more testing to do, but if you don't like
this approach I have to think on something else.

Cheers
-- 
Samuel

-- 
You received this message because you are subscribed to the Google Groups 
"erlware-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/erlware-dev?hl=en.

Reply via email to