"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "IO/HDF/t/hdf_vdata.t" between
PDL-2.081.tar.gz and PDL-2.082.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

hdf_vdata.t  (PDL-2.081):hdf_vdata.t  (PDL-2.082)
skipping to change at line 38 skipping to change at line 38
ok( $Hid != PDL::IO::HDF->FAIL ); ok( $Hid != PDL::IO::HDF->FAIL );
PDL::IO::HDF::VS::_Vstart( $Hid ); PDL::IO::HDF::VS::_Vstart( $Hid );
my $vdata_id = PDL::IO::HDF::VS::_VSattach( $Hid, -1, "w" ); my $vdata_id = PDL::IO::HDF::VS::_VSattach( $Hid, -1, "w" );
PDL::IO::HDF::VS::_VSsetname( $vdata_id, 'vdata_name' ); PDL::IO::HDF::VS::_VSsetname( $vdata_id, 'vdata_name' );
PDL::IO::HDF::VS::_VSsetclass( $vdata_id, 'vdata_class' ); PDL::IO::HDF::VS::_VSsetclass( $vdata_id, 'vdata_class' );
my $vdata_ref = PDL::IO::HDF::VS::_VSgetid( $Hid, -1 ); my $vdata_ref = PDL::IO::HDF::VS::_VSgetid( $Hid, -1 );
ok( $vdata_ref != PDL::IO::HDF->FAIL ); ok( $vdata_ref != PDL::IO::HDF->FAIL );
my $name = ""; is( PDL::IO::HDF::VS::_VSgetname( $vdata_id ), "vdata_name" );
PDL::IO::HDF::VS::_VSgetname( $vdata_id, $name ); is( PDL::IO::HDF::VS::_VSgetclass( $vdata_id ), "vdata_class" );
ok( $name eq "vdata_name" );
my $class = "";
PDL::IO::HDF::VS::_VSgetclass( $vdata_id, $class );
ok( $class eq "vdata_class" );
my $data = PDL::float sequence(10); my $data = PDL::float sequence(10);
my $HDFtype = $PDL::IO::HDF::SDtypeTMAP->{$data->get_datatype()}; my $HDFtype = $PDL::IO::HDF::SDtypeTMAP->{$data->get_datatype()};
ok( PDL::IO::HDF::VS::_VSfdefine( $vdata_id, 'PX', $HDFtype, 1) ); ok( PDL::IO::HDF::VS::_VSfdefine( $vdata_id, 'PX', $HDFtype, 1) );
ok( PDL::IO::HDF::VS::_VSsetfields( $vdata_id, 'PX') ); ok( PDL::IO::HDF::VS::_VSsetfields( $vdata_id, 'PX') );
ok( PDL::IO::HDF::VS::_VSwrite( $vdata_id, $data, 10, PDL::IO::HDF->FULL_INTERLA CE ) ); ok( PDL::IO::HDF::VS::_VSwrite( $vdata_id, $data, 10, PDL::IO::HDF->FULL_INTERLA CE ) );
PDL::IO::HDF::VS::_VSdetach( $vdata_id ); PDL::IO::HDF::VS::_VSdetach( $vdata_id );
PDL::IO::HDF::VS::_Vend( $Hid ); PDL::IO::HDF::VS::_Vend( $Hid );
skipping to change at line 75 skipping to change at line 70
ok( $vdata_ref != PDL::IO::HDF->FAIL ); ok( $vdata_ref != PDL::IO::HDF->FAIL );
$vdata_id = PDL::IO::HDF::VS::_VSattach( $Hid, $vdata_ref, "r" ); $vdata_id = PDL::IO::HDF::VS::_VSattach( $Hid, $vdata_ref, "r" );
ok( $vdata_id != PDL::IO::HDF->FAIL ); ok( $vdata_id != PDL::IO::HDF->FAIL );
my $vdata_size = 0; my $vdata_size = 0;
my $n_records = 0; my $n_records = 0;
my $interlace = 0; my $interlace = 0;
my $fields = ""; my $fields = "";
my $vdata_name = ""; my $vdata_name = "";
ok( PDL::IO::HDF::VS::_VSinquire( $vdata_id, $n_records, $interlace, $fields, $v data_size, $vdata_name) ); PDL::IO::HDF::VS::_VSinquire( $vdata_id, $n_records, $interlace, $fields, $vdata _size, $vdata_name);
my @tfields = split(",",$fields); my @tfields = split(",",$fields);
my $data_type = PDL::IO::HDF::VS::_VFfieldtype( $vdata_id, 0 ); my $data_type = PDL::IO::HDF::VS::_VFfieldtype( $vdata_id, 0 );
$data = ones( $PDL::IO::HDF::SDinvtypeTMAP2->{$data_type}, 10 ); $data = ones( $PDL::IO::HDF::SDinvtypeTMAP2->{$data_type}, 10 );
ok( PDL::IO::HDF::VS::_VSread( $vdata_id, $data, $n_records, $interlace ) ); ok( PDL::IO::HDF::VS::_VSread( $vdata_id, $data, $n_records, $interlace ) );
my $expected_data = sequence(10); my $expected_data = sequence(10);
ok( sub { tapprox( $data, $expected_data ) } ); ok( sub { tapprox( $data, $expected_data ) } );
PDL::IO::HDF::VS::_VSdetach( $vdata_id ); PDL::IO::HDF::VS::_VSdetach( $vdata_id );
 End of changes. 2 change blocks. 
8 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)