Data-SecsPack

 view release on metacpan or  search on metacpan

t/Data/SecsPackStress.pm  view on Meta::CPAN


########
# The Test::STDmaker module uses the data after the __DATA__ 
# token to automatically generate the this file.
#
# Don't edit anything before __DATA_. Edit instead
# the data after the __DATA__ token.
#
# ANY CHANGES MADE BEFORE the  __DATA__ token WILL BE LOST
#
# the next time Test::STDmaker generates this file.
#
#


=head1 TITLE PAGE

 Detailed Software Test Description (STD)

 for

 Perl Data::SecsPack Program Module

 Revision: -

 Version: 

 Date: 2004/04/26

 Prepared for: General Public 

 Prepared by:  http://www.SoftwareDiamonds.com support@SoftwareDiamonds.com

 Classification: None

=head1 SCOPE

This detail STD and the 
L<General Perl Program Module (PM) STD|Test::STD::PerlSTD>
establishes the tests to verify the
requirements of Perl Program Module (PM) L<Data::SecsPack|Data::SecsPack>

The format of this STD is a tailored L<2167A STD DID|Docs::US_DOD::STD>.
in accordance with 
L<Detail STD Format|Test::STDmaker/Detail STD Format>.

#######
#  
#  4. TEST DESCRIPTIONS
#
#  4.1 Test 001
#
#  ..
#
#  4.x Test x
#
#

=head1 TEST DESCRIPTIONS

The test descriptions uses a legend to
identify different aspects of a test description
in accordance with
L<STD FormDB Test Description Fields|Test::STDmaker/STD FormDB Test Description Fields>.

=head2 Test Plan

 T: 104^

=head2 ok: 1


  C:
     use File::Package;
     my $fp = 'File::Package';
     my $uut = 'Data::SecsPack';
     my $loaded;
     ########
     # Force scalar or array context
     #
     my ($result,@result);
 ^
  N: UUT Loaded^
  R: L<DataPort::DataFile/general [1] - load>^
  S: $loaded^

  C:
    my $errors = $fp->load_package($uut, 
        qw(bytes2int float2binary 
           ifloat2binary int2bytes   
           pack_float pack_int pack_num  
           str2float str2int 
           unpack_float unpack_int unpack_num) );
 ^
  A: $errors^
 SE: ''^
 ok: 1^

=head2 ok: 2,4,6


  C:
  my @bytes_test =  (
     #  $integer                       @bytes 
     #----------------------------------------------
     [ '32767'                       , 127,255,                              ],
     [ '32768'                       , 128,  0,                              ],
     [ '123456789123456789123456789' , 102,30,253,242,227,177,159,124,4,95,21],
  
   );
   my ($string, $integer, @bytes) = ('',());
   foreach (@bytes_test) {
      ($integer,@bytes) = @$_;
 ^
  N: int2bytes(\"$integer\")^
  A: [int2bytes("$integer")]^
  E: [@bytes]^
 ok: 2,4,6^

=head2 ok: 3,5,7



( run in 1.645 second using v1.01-cache-2.11-cpan-39bf76dae61 )