I've a problem in testing a module using Inline::C. In the module AI::NeuralNet::Simple, I do some work allocating and deallocating memory and I've been bitten by a bug where I wasn't allocating memory properly for one of my arrays. It's fixed, but I have no idea how to write a test for that.
I'm also rather unclear about how to test the C functions. I only have 18 tests for the module, but it needs heavy redesign internally (such as not using globals in C) and while testing through the Perl interface will catch bugs, it won't tell me where the bugs are. I suppose I could use assert(), but I have no idea how to remove #include <assert.h> when the module gets installed (or even if I should remove it).
My C skills are poor, so don't assume too much about my knowledge.
Cheers,
Ovid
New address of my CGI Course.
In reply to Testing Inline::C Modules by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |