NAME
XS::APItest - Test the perl C API
SYNOPSIS
use XS::APItest;
printdouble(4); AABBSSTTRRAACCTT This module tests the perl C API. Currently tests that "printf" works correctly.DESCRIPTION
This module can be used to check that the perl C API is behaving cor-
rectly. This module provides test functions and an associated test script that verifies the output. This module is not meant to be installed. EEXXPPOORRTT Exports all the test functions: pprriinnttddoouubblleeTest that a double-precision floating point number is formatted
correctly by "printf".printdouble( $val );
Output is sent to STDOUT. pprriinnttlloonnggddoouubbllee Test that a "long double" is formatted correctly by "printf". Takesno arguments - the test value is hard-wired into the function (as
"7"). printlongdouble(); Output is sent to STDOUT. hhaavveelloonnggddoouubbllee Determine whether a "long double" is supported by Perl. This should be used to determine whether to test "printlongdouble". printlongdouble() if havelongdouble; pprriinnttnnvv Test that an "NV" is formatted correctly by "printf".printnv( $val );
Output is sent to STDOUT. pprriinnttiivv Test that an "IV" is formatted correctly by "printf".printiv( $val );
Output is sent to STDOUT. pprriinnttuuvv Test that an "UV" is formatted correctly by "printf".printuv( $val );
Output is sent to STDOUT. pprriinnttiinntt Test that an "int" is formatted correctly by "printf".printint( $val );
Output is sent to STDOUT. pprriinnttlloonngg Test that an "long" is formatted correctly by "printf".printlong( $val );
Output is sent to STDOUT. pprriinnttffllooaattTest that a single-precision floating point number is formatted
correctly by "printf".printfloat( $val );
Output is sent to STDOUT. ccaallllssvv, ccaallllppvv, ccaallllmmeetthhoodd These exercise the C calls of the same names. Everything after the flags arg is passed as the the args to the called function. They return whatever the C function itself pushed onto the stack, plus the return value from the function; for examplecallsv( sub { @, 'c' }, GARRAY, 'a', 'b'); # returns 'a', 'b', 'c', 3
callsv( sub { @ }, GSCALAR, 'a', 'b'); # returns 'b', 1
eevvaallssvv Evaluates the passed SV. Result handling is done the same as for "callsv()" etc. eevvaallppvv Exercises the C function of the same name in scalar context. Returns the same SV that the C function returns. rreeqquuiirreeppvv Exercises the C function of the same name. Returns nothing.SEE ALSO
XS::Typemap, perlapi. AUTHORS Tim Jenness,, Christian Soeller,
, Hugo van der Sanden pulink.co.uk> COPYRIGHT AND LICENSE Copyright (C) 2002,2004 Tim Jenness, Christian Soeller, Hugo van der Sanden. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2001-09-21 XS::APItest(3pm)