Skip to content

Commit

Permalink
fix tests for 32 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Oct 5, 2024
1 parent e1f070b commit 2a5b290
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ include("utils.jl")
codec = ZstdCompressor()
e = TranscodingStreams.Error()
@test TranscodingStreams.startproc(codec, :read, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, 10, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, Int64(10), e) === :ok
@test TranscodingStreams.process(codec, m1, m2, e) === (0, 0, :error)
@test e[] == ErrorException("zstd error: Src size is incorrect")
TranscodingStreams.finalize(codec)
Expand All @@ -194,7 +194,7 @@ include("utils.jl")
codec = ZstdCompressor()
e = TranscodingStreams.Error()
@test TranscodingStreams.startproc(codec, :read, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, 10000, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, Int64(10000), e) === :ok
@test TranscodingStreams.process(codec, m1, m2, e)[3] === :ok
m1 = TranscodingStreams.Memory(pointer(d1), 0)
@test TranscodingStreams.process(codec, m1, m2, e)[3] === :error
Expand All @@ -208,7 +208,7 @@ include("utils.jl")
e = TranscodingStreams.Error()
@test TranscodingStreams.startproc(codec, :read, e) === :ok
@test TranscodingStreams.process(codec, m1, m2, e)[3] === :ok
@test TranscodingStreams.pledgeinsize(codec, 10000, e) === :error
@test TranscodingStreams.pledgeinsize(codec, Int64(10000), e) === :error
@test e[] == ErrorException("zstd error setting pledged source size")
TranscodingStreams.finalize(codec)
end
Expand All @@ -218,7 +218,7 @@ include("utils.jl")
codec = ZstdCompressor()
e = TranscodingStreams.Error()
@test TranscodingStreams.startproc(codec, :read, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, -1, e) === :ok
@test TranscodingStreams.pledgeinsize(codec, Int64(-1), e) === :ok
@test TranscodingStreams.process(codec, m1, m2, e)[3] === :ok
TranscodingStreams.finalize(codec)
end
Expand Down Expand Up @@ -267,7 +267,7 @@ include("utils.jl")
GC.@preserve data let m = TranscodingStreams.Memory(pointer(data), length(data))
if isdefined(TranscodingStreams, :pledgeinsize)
try
TranscodingStreams.pledgeinsize(codec, 10, TranscodingStreams.Error())
TranscodingStreams.pledgeinsize(codec, Int64(10), TranscodingStreams.Error())
catch
end
end
Expand Down

0 comments on commit 2a5b290

Please sign in to comment.