Skip to content

Commit 61f51dd

Browse files
committed
Fixing 32-bit cases
Also fixing the testcases to remove error cascade
1 parent 3229bea commit 61f51dd

File tree

3 files changed

+18
-24
lines changed

3 files changed

+18
-24
lines changed

src/CosStream.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ end
117117
@compat mutable struct PNGPredictorSource{T<:BufferedInputStream}
118118
input::T
119119
predictor::UInt8
120-
columns::UInt32
120+
columns::Int
121121
prev::Vector{UInt8}
122122
curr::Vector{UInt8}
123-
s::Int32
124-
e::Int32
123+
s::Int
124+
e::Int
125125
isResidue::Bool
126126
isEOF::Bool
127-
count_scanline::Int32
127+
count_scanline::Int
128128
isClosed::Bool
129129

130130
function PNGPredictorSource{T}(input::T,pred::Int,columns::Int) where{T<:BufferedInputStream}

test/debugIO.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ are not affected.
99

1010
const DEBUG=true
1111

12-
IODebug=[0,Vector{Tuple{AbstractString,IOStream}}()]
13-
1412
if DEBUG
1513

1614
import PDFIO.Common: get_tempfilepath,
@@ -30,6 +28,8 @@ function Base.close(stream::BufferedInputStream{IOStream})
3028
return
3129
end
3230

31+
IODebug=[0,Vector{Tuple{AbstractString,IOStream}}()]
32+
3333
function get_tempfilepath()
3434
global IODebug
3535
IODebug[1]+=1

test/runtests.jl

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ include("debugIO.jl")
2323
@assert length(buf) == 18669
2424
@assert length(pdPageGetContentObjects(page).objs)==190
2525
pdDocClose(doc)
26-
@assert length(utilPrintOpenFiles())==0
27-
files=readdir(get_tempdir())
28-
length(files)==0
26+
length(utilPrintOpenFiles())==0
2927
end
3028
end
3129

@@ -44,9 +42,7 @@ include("debugIO.jl")
4442
@assert length(buf) == 1021
4543
@assert length(pdPageGetContentObjects(page).objs)==1
4644
pdDocClose(doc)
47-
@assert length(utilPrintOpenFiles())==0
48-
files=readdir(get_tempdir())
49-
length(files)==0
45+
length(utilPrintOpenFiles())==0
5046
end
5147
end
5248

@@ -61,9 +57,7 @@ include("debugIO.jl")
6157
page = pdDocGetPage(doc, 1)
6258
@assert pdPageIsEmpty(page) == false
6359
pdDocClose(doc)
64-
@assert length(utilPrintOpenFiles())==0
65-
files=readdir(get_tempdir())
66-
length(files)==0
60+
length(utilPrintOpenFiles())==0
6761
end
6862
end
6963

@@ -82,9 +76,7 @@ include("debugIO.jl")
8276
close(stm)
8377
@assert length(data)==273
8478
pdDocClose(doc)
85-
@assert length(utilPrintOpenFiles())==0
86-
files=readdir(get_tempdir())
87-
length(files)==0
79+
length(utilPrintOpenFiles())==0
8880
end
8981
end
9082

@@ -103,9 +95,7 @@ include("debugIO.jl")
10395
close(stm)
10496
@assert length(data)==121203
10597
pdDocClose(doc)
106-
@assert length(utilPrintOpenFiles())==0
107-
files=readdir(get_tempdir())
108-
length(files)==0
98+
length(utilPrintOpenFiles())==0
10999
end
110100
end
111101

@@ -124,9 +114,7 @@ include("debugIO.jl")
124114
close(stm)
125115
@assert length(data)==38118
126116
pdDocClose(doc)
127-
@assert length(utilPrintOpenFiles())==0
128-
files=readdir(get_tempdir())
129-
length(files)==0
117+
length(utilPrintOpenFiles())==0
130118
end
131119
end
132120

@@ -136,4 +124,10 @@ include("debugIO.jl")
136124
length(utilPrintOpenFiles())==0
137125
end
138126
end
127+
files=readdir(get_tempdir())
128+
@assert length(files)==0
129+
end
130+
131+
if isfile("pvt/pvttests.jl")
132+
#include("pvt/pvttests.jl")
139133
end

0 commit comments

Comments
 (0)