"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "t/bad.t" between
PDL-2.082.tar.gz and PDL-2.083.tar.gz

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

bad.t  (PDL-2.082):bad.t  (PDL-2.083)
skipping to change at line 653 skipping to change at line 653
note "\$p = $p"; note "\$p = $p";
is( "$p", "[1 BAD 3 4]", "PDL vector (with bv = 2)"); is( "$p", "[1 BAD 3 4]", "PDL vector (with bv = 2)");
is( "" . ( $p > 1 ), '[0 BAD 1 1]', "compare PDL against (scalar = 1)"); is( "" . ( $p > 1 ), '[0 BAD 1 1]', "compare PDL against (scalar = 1)");
is( "" . ( $p > 2 ), '[0 BAD 1 1]', "compare PDL against (scalar = 2)" ); is( "" . ( $p > 2 ), '[0 BAD 1 1]', "compare PDL against (scalar = 2)" );
is( "" . ( $p > 3 ), '[0 BAD 0 1]', "compare PDL against (scalar = 3)"); is( "" . ( $p > 3 ), '[0 BAD 0 1]', "compare PDL against (scalar = 3)");
is( "" . ( $p > 4 ), '[0 BAD 0 0]', "compare PDL against (scalar = 4)"); is( "" . ( $p > 4 ), '[0 BAD 0 0]', "compare PDL against (scalar = 4)");
}; };
subtest "Throw a warning when badvalue is set to 0 or 1 and a comparison operato r is used" => sub { subtest "Throw a warning when badvalue is set to 0 or 1 and a comparison operato r is used" => sub {
my $warn_msg_re = qr/Badvalue is set to 0 or 1/; my $warn_msg_re = qr/badvalue is set to 0 or 1/;
# We do not need to change the contents of this PDL. # We do not need to change the contents of this PDL.
# Only the value of badvalue changes. # Only the value of badvalue changes.
my $p = pdl([0, 1, 2]); my $p = pdl([0, 1, 2]);
$p->badflag(1); $p->badflag(1);
subtest "Badvalue set to 0" => sub { subtest "Badvalue set to 0" => sub {
$p->badvalue(0); $p->badvalue(0);
warning_like { $p == 1 } $warn_msg_re, "A warning thrown for badv al == 0 and == operator"; warning_like { $p == 1 } $warn_msg_re, "A warning thrown for badv al == 0 and == operator";
}; };
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

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