Fixes, tests

Minor updates that caused major headaches for Math::Primality.  With this commit, some methods are refactored and they now have tests.  The headaches this time were discovered the hard way – passing the wrong type to Math::GMPz (or any other code that couples with C libraries) will causes segfaults and unhelpful error messages.  All of my tests actually passed the first time, but because I was passing in integers rather than Math::GMPz’s everything exploded in a fiery ball of doom.  Perhaps someone (smarter than myself) can modify the XS code so that it does type checks before blindly passing it into the C library.  I would have thought that would have been standard operating procedure for any code that binds to native libraries, but hey, who knows.  Maybe if I get pointed in the right direction I’ll add in some type checking code.

Next on the docket is to finally test out the Math::GMPz patches to the Makefile.PL make sure that it identifies Mac OS X as not using a 64 bit int for Math::GMPz.  And more work on the Lucas-Selfridge algorithim.  Hooray.

Posted in Google Summer of Code | Comments Off on Fixes, tests

Comments are closed.