1N/Apackage XS::APItest;
1N/A
1N/Ause 5.008;
1N/Ause strict;
1N/Ause warnings;
1N/Ause Carp;
1N/A
1N/Ause base qw/ DynaLoader Exporter /;
1N/A
1N/A# Items to export into callers namespace by default. Note: do not export
1N/A# names by default without a very good reason. Use EXPORT_OK instead.
1N/A# Do not simply export all your public functions/methods/constants.
1N/A
1N/A# Export everything since these functions are only used by a test script
1N/Aour @EXPORT = qw( print_double print_int print_long
1N/A print_float print_long_double have_long_double print_flush
1N/A);
1N/A
1N/Aour $VERSION = '0.03';
1N/A
1N/Abootstrap XS::APItest $VERSION;
1N/A
1N/A1;
1N/A__END__
1N/A
1N/A=head1 NAME
1N/A
1N/AXS::APItest - Test the perl C API
1N/A
1N/A=head1 SYNOPSIS
1N/A
1N/A use XS::APItest;
1N/A print_double(4);
1N/A
1N/A=head1 ABSTRACT
1N/A
1N/AThis module tests the perl C API. Currently tests that C<printf>
1N/Aworks correctly.
1N/A
1N/A=head1 DESCRIPTION
1N/A
1N/AThis module can be used to check that the perl C API is behaving
1N/Acorrectly. This module provides test functions and an associated
1N/Atest script that verifies the output.
1N/A
1N/AThis module is not meant to be installed.
1N/A
1N/A=head2 EXPORT
1N/A
1N/AExports all the test functions:
1N/A
1N/A=over 4
1N/A
1N/A=item B<print_double>
1N/A
1N/ATest that a double-precision floating point number is formatted
1N/Acorrectly by C<printf>.
1N/A
1N/A print_double( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_long_double>
1N/A
1N/ATest that a C<long double> is formatted correctly by
1N/AC<printf>. Takes no arguments - the test value is hard-wired
1N/Ainto the function (as "7").
1N/A
1N/A print_long_double();
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<have_long_double>
1N/A
1N/ADetermine whether a C<long double> is supported by Perl. This should
1N/Abe used to determine whether to test C<print_long_double>.
1N/A
1N/A print_long_double() if have_long_double;
1N/A
1N/A=item B<print_nv>
1N/A
1N/ATest that an C<NV> is formatted correctly by
1N/AC<printf>.
1N/A
1N/A print_nv( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_iv>
1N/A
1N/ATest that an C<IV> is formatted correctly by
1N/AC<printf>.
1N/A
1N/A print_iv( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_uv>
1N/A
1N/ATest that an C<UV> is formatted correctly by
1N/AC<printf>.
1N/A
1N/A print_uv( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_int>
1N/A
1N/ATest that an C<int> is formatted correctly by
1N/AC<printf>.
1N/A
1N/A print_int( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_long>
1N/A
1N/ATest that an C<long> is formatted correctly by
1N/AC<printf>.
1N/A
1N/A print_long( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=item B<print_float>
1N/A
1N/ATest that a single-precision floating point number is formatted
1N/Acorrectly by C<printf>.
1N/A
1N/A print_float( $val );
1N/A
1N/AOutput is sent to STDOUT.
1N/A
1N/A=back
1N/A
1N/A=head1 SEE ALSO
1N/A
1N/AL<XS::Typemap>, L<perlapi>.
1N/A
1N/A=head1 AUTHORS
1N/A
1N/ATim Jenness, E<lt>t.jenness@jach.hawaii.eduE<gt>,
1N/AChristian Soeller, E<lt>csoelle@mph.auckland.ac.nzE<gt>,
1N/AHugo van der Sanden E<lt>hv@crypt.compulink.co.ukE<gt>
1N/A
1N/A=head1 COPYRIGHT AND LICENSE
1N/A
1N/ACopyright (C) 2002 Tim Jenness, Christian Soeller, Hugo van der Sanden.
1N/AAll Rights Reserved.
1N/A
1N/AThis library is free software; you can redistribute it and/or modify
1N/Ait under the same terms as Perl itself.
1N/A
1N/A=cut