in reply to Testing Inline::C Modules
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).
You might want to consider using a separate testing frameworks for the C code - you can find some on xprogramming.com. I find it easier to test libraries using the same language they're written in.
It's also very easy to write some quick C code to chuck out test results in the format that Test::Harness expects. You can then have a normal *.t script fire it off and get your C tests integrated into your Perl test suite.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Testing Inline::C Modules
by Ovid (Cardinal) on Feb 11, 2004 at 22:38 UTC | |
by adrianh (Chancellor) on Feb 12, 2004 at 00:08 UTC |