Subject: | [Win32] Some test failures |
Hi,
Before I forget to mention it, this is using PDL-2.016.
C:\sisyphusion\PDL-CCS-1.23.1>pmver PDL::CCS
1.23.1
There's a problem with CCS/IO/t/01_io.t:
C:\sisyphusion\PDL-CCS-1.23.1>perl CCS/IO/t/01_io.t
1..90
ok 1 - use PDL::CCS::IO::Common;
ok 2 - use PDL::CCS::IO::FastRaw;
ok 3 - use PDL::CCS::IO::FITS;
ok 4 - use PDL::CCS::IO::MatrixMarket;
ok 5 - use PDL::CCS::IO::LDAC;
ok 6 - use PDL::CCS::IO::PETSc;
ok 7 - ccs.raw - writer sub
ok 8 - ccs.raw - reader sub
ok 9 - ccs.raw - write
ok 10 - ccs.raw - read
ok 11 - ccs.raw - ref
ok 12 - ccs.raw - data
ok 13 - ccs.fits - writer sub
ok 14 - ccs.fits - reader sub
ok 15 - ccs.fits - write
rfits: strange BITPIX value in header - I give up!
# Looks like you planned 90 tests but ran 15.
# Looks like your test exited with 255 just after 15.
I don't yet have a solution to that.
Similar to https://rt.cpan.org/Ticket/Display.html?id=115076 there are also some problems in a couple of test scripts wrt 'inf' and 'nan' values.
These are addressed by the following patch:
################################
--- CCS/t/03_ufuncs.t_orig 2016-06-05 16:10:55 +1000
+++ CCS/t/03_ufuncs.t 2016-06-05 16:14:44 +1000
@@ -39,8 +39,9 @@
##-- sorting with bad values doesn't work right in PDL-2.015 ; ccs/vv sorts BAD as minimal, PDL sort BAD as maximal: wtf?
if ($ufunc_name =~ /qsort/ && $missing_val->isbad) {
- $missing_val = 'inf';
- $a->inplace->setbadtoval('inf');
+ my $inf = $^O =~ /MSWin32/i ? (99**99)**99 : 'inf';
+ $missing_val = $inf;
+ $a->inplace->setbadtoval($inf);
}
my $ccs = $a->toccs($missing_val);
--- CCS/t/06_matops.t_orig 2016-06-05 16:02:51 +1000
+++ CCS/t/06_matops.t 2016-06-05 16:08:50 +1000
@@ -103,13 +103,14 @@
(my $tmp=$a0->slice("(1),")) .= 0;
my $ccs0 = $a0->toccs;
my $vcos0 = $ccs0->vcos_zdd($b);
- my $vcos0_want = pdl([1,'nan',-1]);
+ my $nan = $^O =~ /MSWin32/i ? ((99**99)**99) - ((99**99)**99) : 'nan';
+ my $vcos0_want = pdl([1,$nan,-1]);
pdlapprox("vcos_zdd:nullvec:a:nan", $vcos0, $vcos0_want, 1e-4);
##-- test: vcos_zdd: nullvec:b
my $b0 = $b->zeroes;
$vcos0 = $ccs->vcos_zdd($b0);
- $vcos0_want = pdl([qw(nan nan nan)]);
+ $vcos0_want = pdl([$nan, $nan, $nan]);
pdlok("vcos_zdd:nullvec:b:nan", $vcos0, $vcos0_want);
##-- test: vcos_zdd: bad:b
################################
Cheers,
Rob