Skip to content

Commit

Permalink
Merge branch 'master' into mkitti-reset-session-on-error-only-for-tra…
Browse files Browse the repository at this point in the history
…nscode
  • Loading branch information
nhz2 authored Sep 3, 2024
2 parents 874e49c + 31cf742 commit fb13db9
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
11 changes: 2 additions & 9 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,13 @@ uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
license = "MIT"
authors = ["Kenta Sato <[email protected]>",
"JuliaIO Github Organization"]
version = "0.8.3"
version = "0.8.5"

[deps]
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4"

[compat]
TranscodingStreams = "0.9, 0.10"
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"
24 changes: 16 additions & 8 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 @@ -40,16 +46,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)
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

0 comments on commit fb13db9

Please sign in to comment.