Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / sun4-solaris / XS / APItest.pm
CommitLineData
86530b38
AT
1package XS::APItest;
2
3use 5.008;
4use strict;
5use warnings;
6use Carp;
7
8use base qw/ DynaLoader Exporter /;
9
10# Items to export into callers namespace by default. Note: do not export
11# names by default without a very good reason. Use EXPORT_OK instead.
12# Do not simply export all your public functions/methods/constants.
13
14# Export everything since these functions are only used by a test script
15our @EXPORT = qw( print_double print_int print_long
16 print_float print_long_double have_long_double
17);
18
19our $VERSION = '0.01';
20
21bootstrap XS::APItest $VERSION;
22
231;
24__END__
25
26=head1 NAME
27
28XS::APItest - Test the perl C API
29
30=head1 SYNOPSIS
31
32 use XS::APItest;
33 print_double(4);
34
35=head1 ABSTRACT
36
37This module tests the perl C API. Currently tests that C<printf>
38works correctly.
39
40=head1 DESCRIPTION
41
42This module can be used to check that the perl C API is behaving
43correctly. This module provides test functions and an associated
44test script that verifies the output.
45
46This module is not meant to be installed.
47
48=head2 EXPORT
49
50Exports all the test functions:
51
52=over 4
53
54=item B<print_double>
55
56Test that a double-precision floating point number is formatted
57correctly by C<printf>.
58
59 print_double( $val );
60
61Output is sent to STDOUT.
62
63=item B<print_long_double>
64
65Test that a C<long double> is formatted correctly by
66C<printf>. Takes no arguments - the test value is hard-wired
67into the function (as "7").
68
69 print_long_double();
70
71Output is sent to STDOUT.
72
73=item B<have_long_double>
74
75Determine whether a C<long double> is supported by Perl. This should
76be used to determine whether to test C<print_long_double>.
77
78 print_long_double() if have_long_double;
79
80=item B<print_nv>
81
82Test that an C<NV> is formatted correctly by
83C<printf>.
84
85 print_nv( $val );
86
87Output is sent to STDOUT.
88
89=item B<print_iv>
90
91Test that an C<IV> is formatted correctly by
92C<printf>.
93
94 print_iv( $val );
95
96Output is sent to STDOUT.
97
98=item B<print_uv>
99
100Test that an C<UV> is formatted correctly by
101C<printf>.
102
103 print_uv( $val );
104
105Output is sent to STDOUT.
106
107=item B<print_int>
108
109Test that an C<int> is formatted correctly by
110C<printf>.
111
112 print_int( $val );
113
114Output is sent to STDOUT.
115
116=item B<print_long>
117
118Test that an C<long> is formatted correctly by
119C<printf>.
120
121 print_long( $val );
122
123Output is sent to STDOUT.
124
125=item B<print_float>
126
127Test that a single-precision floating point number is formatted
128correctly by C<printf>.
129
130 print_float( $val );
131
132Output is sent to STDOUT.
133
134=back
135
136=head1 SEE ALSO
137
138L<XS::Typemap>, L<perlapi>.
139
140=head1 AUTHORS
141
142Tim Jenness, E<lt>t.jenness@jach.hawaii.eduE<gt>,
143Christian Soeller, E<lt>csoelle@mph.auckland.ac.nzE<gt>,
144Hugo van der Sanden E<lt>hv@crypt.compulink.co.ukE<gt>
145
146=head1 COPYRIGHT AND LICENSE
147
148Copyright (C) 2002 Tim Jenness, Christian Soeller, Hugo van der Sanden.
149All Rights Reserved.
150
151This library is free software; you can redistribute it and/or modify
152it under the same terms as Perl itself.
153
154=cut