No such thing as a small change | |
PerlMonks |
Testing a XS moduleby technojosh (Priest) |
on Aug 29, 2007 at 16:19 UTC ( [id://635840]=perlquestion: print w/replies, xml ) | Need Help?? |
technojosh has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to get comfortable with XS modules, as the ability to convert C++ code to a perl module would be invaluable in the current problem I'm working on. I have made it through some of the perlxstut examples, and my question is in regards to testing the XS module using 'dmake test'... The idea was to make a test script to run 4 test cases on a simple XS module with a method called 'is_even' that takes an int and returns true if it is even. My current "Mytest.t" looks like this:
now when I run 'dmake test', I get the error message: Looks like you planned 4 tests but only ran 1 The perlxstut says to modify the BEGIN block to "print 1..4", but anything I change in the BEGIN block leads to syntax errors. I'm sure I am missing something very easy here, what am I doing wrong with the BEGIN block of my test code?
Back to
Seekers of Perl Wisdom
|
|