Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
license = "MIT"
authors = ["Kenta Sato <[email protected]>",
"JuliaIO Github Organization"]
version = "0.8.4"
version = "0.8.5"

[deps]
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
Expand All @@ -13,10 +13,3 @@ Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4"
TranscodingStreams = "0.9, 0.10, 0.11"
Zstd_jll = "1.5.5"
julia = "1.3"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[targets]
test = ["Test", "Random"]
6 changes: 6 additions & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestsForCodecPackages = "c2e61002-3542-480d-8b3c-5f05cc4f8554"
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
29 changes: 16 additions & 13 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
using CodecZstd
using Random
using TranscodingStreams
using TestsForCodecPackages:
test_roundtrip_read,
test_roundtrip_write,
test_roundtrip_transcode,
test_roundtrip_lines,
test_roundtrip_seekstart
using Test

Random.seed!(1234)
Expand Down Expand Up @@ -39,21 +45,18 @@ Random.seed!(1234)
@test ZstdCompressorStream <: TranscodingStreams.TranscodingStream
@test ZstdDecompressorStream <: TranscodingStreams.TranscodingStream

TranscodingStreams.test_roundtrip_read(ZstdCompressorStream, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_write(ZstdCompressorStream, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_lines(ZstdCompressorStream, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_transcode(ZstdCompressor, ZstdDecompressor)
test_roundtrip_read(ZstdCompressorStream, ZstdDecompressorStream)
test_roundtrip_write(ZstdCompressorStream, ZstdDecompressorStream)
test_roundtrip_lines(ZstdCompressorStream, ZstdDecompressorStream)
test_roundtrip_transcode(ZstdCompressor, ZstdDecompressor)
test_roundtrip_seekstart(ZstdCompressorStream, ZstdDecompressorStream)

frame_encoder = io -> TranscodingStream(ZstdFrameCompressor(), io)
TranscodingStreams.test_roundtrip_read(frame_encoder, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_write(frame_encoder, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_lines(frame_encoder, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_transcode(ZstdFrameCompressor, ZstdDecompressor)

if isdefined(TranscodingStreams, :test_roundtrip_seekstart)
TranscodingStreams.test_roundtrip_seekstart(ZstdCompressorStream, ZstdDecompressorStream)
TranscodingStreams.test_roundtrip_seekstart(frame_encoder, ZstdDecompressorStream)
end
test_roundtrip_read(frame_encoder, ZstdDecompressorStream)
test_roundtrip_write(frame_encoder, ZstdDecompressorStream)
test_roundtrip_lines(frame_encoder, ZstdDecompressorStream)
test_roundtrip_transcode(ZstdFrameCompressor, ZstdDecompressor)
test_roundtrip_seekstart(frame_encoder, ZstdDecompressorStream)

@testset "ZstdFrameCompressor streaming edge case" begin
codec = ZstdFrameCompressor()
Expand Down