Skip to content

Commit

Permalink
tidy IO::FlexRaw
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 9, 2024
1 parent c474d9d commit bc974f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions IO/FlexRaw/FlexRaw.pm
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ READ:
ref $hdr->{Dims} ? @{$hdr->{Dims}} : $hdr->{Dims});
$len = length $ {$pdl->get_dataref};

&mapchunk($d,$pdl,$len,$name,$offset) or last READ;
mapchunk($d,$pdl,$len,$name,$offset) or last READ;
$chunkread += $len;
if ($newfile && $f77mode) {
if ($opts{Creat}) {
Expand All @@ -726,7 +726,7 @@ READ:
if ($f77mode && $chunk->at == $chunkread) {
$chunkread = 0;
my ($check) = $chunk->copy;
&mapchunk($d,$check,4,$name,$offset) or last READ;
mapchunk($d,$check,4,$name,$offset) or last READ;
if ($opts{Creat}) {
$check->set(0,$size-8);
} else {
Expand Down
2 changes: 1 addition & 1 deletion IO/FlexRaw/t/flexraw.t
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ SKIP: {
}

# **TEST 8** compare mapfraw ndarray with original ndarray
ok(all(approx($x,$c)), "A ndarray and its mapflex representation should be about equal");
ok(all(approx($x,$c)), "An ndarray and its mapflex representation should be about equal");

# **TEST 9** modifications should be saved when $c goes out of scope
# THIS TEST FAILS.
Expand Down
7 changes: 2 additions & 5 deletions IO/FlexRaw/t/iotypes.t
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ for my $type (@types) {
my $hdr = writeflex $data, $pdl;
writeflexhdr($data,$hdr);
my $npdl = eval {readflex $data};
TODO: {
local $TODO = "readflex returns index instead of long";
ok ($pdl->type == $npdl->type &&
all $pdl == $npdl);
}
is $pdl->type, $npdl->type;
ok all $pdl == $npdl;
}

unlink $data, "${data}.hdr";
Expand Down
1 change: 0 additions & 1 deletion IO/HDF/VS/VS.pd
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ sub new
# get lone vdata (not member of a vgroup)
my $lone=PDL::IO::HDF::VS::_VSlone($self->{HID});
my $MAX_REF = 0;
while ( $vdata_ref = shift @$lone )
{
my $mode="r";
Expand Down

0 comments on commit bc974f0

Please sign in to comment.