"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/01-pptest.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).

01-pptest.t  (PDL-2.081):01-pptest.t  (PDL-2.082)
skipping to change at line 262 skipping to change at line 262
); );
pp_deft('output_op2', pp_deft('output_op2',
Pars => 'in(n=2); [o] out()', Pars => 'in(n=2); [o] out()',
OtherPars => '[o] PDL_Anyval v0; [o] PDL_Anyval v1', OtherPars => '[o] PDL_Anyval v0; [o] PDL_Anyval v1',
Code => ' Code => '
pdl_datatypes dt = $PDL(in)->datatype; pdl_datatypes dt = $PDL(in)->datatype;
ANYVAL_FROM_CTYPE($COMP(v0), dt, $in(n=>0)); ANYVAL_FROM_CTYPE($COMP(v0), dt, $in(n=>0));
ANYVAL_FROM_CTYPE($COMP(v1), dt, $in(n=>1)); ANYVAL_FROM_CTYPE($COMP(v1), dt, $in(n=>1));
', ',
); );
pp_deft('output_op3',
Pars => 'in(n=2); [o] out()',
OtherPars => '[o] PDL_Anyval v0; [o] PDL_Anyval v1',
Code => '
pdl_datatypes dt = $PDL(in)->datatype;
ANYVAL_FROM_CTYPE($COMP(v0), dt, $in(n=>0));
ANYVAL_FROM_CTYPE($COMP(v1), dt, $in(n=>1));
',
PMCode => 'sub PDL::test_output_op3 { goto &PDL::_test_output_op3_int }',
);
pp_addhdr('
typedef NV NV_ADD1;
');
pp_add_typemaps(string=><<'EOT');
TYPEMAP: <<END_OF_TYPEMAP
TYPEMAP
NV_ADD1 T_NV_ADD1
INPUT
T_NV_ADD1
$var = SvNV($arg) + 1;
OUTPUT
T_NV_ADD1
sv_setnv($arg, $var - 1);
END_OF_TYPEMAP
EOT
pp_deft('typem',
Pars => 'int [o] out()',
OtherPars => '[o] NV_ADD1 v1',
Code => '$out() = $COMP(v1); $COMP(v1) = 8;',
);
pp_done; pp_done;
# this tests the bug with a trailing comment and *no* newline # this tests the bug with a trailing comment and *no* newline
EOF EOF
't/all.t' => <<'EOF', 't/all.t' => <<'EOF',
use strict; use strict;
use warnings; use warnings;
use Test::More; use Test::More;
skipping to change at line 400 skipping to change at line 433
test_output_op([5,7], my $v0, my $v1); test_output_op([5,7], my $v0, my $v1);
is_deeply [$v0,$v1], [5,7], 'output OtherPars work'; is_deeply [$v0,$v1], [5,7], 'output OtherPars work';
eval { test_output_op(sequence(2,3), my $v0, my $v1) }; eval { test_output_op(sequence(2,3), my $v0, my $v1) };
isnt $@, '', 'broadcast with output OtherPars throws'; isnt $@, '', 'broadcast with output OtherPars throws';
test_output_op2([5,7], my $v0_2, my $v1_2); test_output_op2([5,7], my $v0_2, my $v1_2);
is_deeply [$v0_2,$v1_2], [5,7], 'output OtherPars work 2'; is_deeply [$v0_2,$v1_2], [5,7], 'output OtherPars work 2';
eval { test_output_op2(sequence(2,3), my $v0_2, my $v1_2) }; eval { test_output_op2(sequence(2,3), my $v0_2, my $v1_2) };
isnt $@, '', 'broadcast with output OtherPars throws 2'; isnt $@, '', 'broadcast with output OtherPars throws 2';
test_output_op3([5,7], my $out3 = PDL->null, my $v0_3, my $v1_3);
is_deeply [$v0_3,$v1_3], [5,7], 'output OtherPars work 3' or diag "got: ",$v0_3,
" ",$v1_3;
my $o = test_typem(my $oth = 3);
is "$o", 4;
is "$oth", 7;
done_testing; done_testing;
EOF EOF
); );
my %BADOTHERPARSFILES = ( my %BADOTHERPARSFILES = (
'Makefile.PL' => <<'EOF', 'Makefile.PL' => <<'EOF',
use strict; use strict;
use warnings; use warnings;
use ExtUtils::MakeMaker; use ExtUtils::MakeMaker;
 End of changes. 2 change blocks. 
0 lines changed or deleted 41 lines changed or added

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