Skip to content

Commit

Permalink
use TestsForCodecPackages.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Aug 2, 2024
1 parent 6817ed2 commit 35955d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
TestsForCodecPackages = "c2e61002-3542-480d-8b3c-5f05cc4f8554"
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
ZipArchives = "49080126-0e18-4c2a-b176-c102e4b3760c"
p7zip_jll = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
20 changes: 12 additions & 8 deletions test/test_ts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ using CodecInflate64
using CodecZlib: DeflateCompressor, DeflateCompressorStream
using Random
using Test
import TranscodingStreams:
TranscodingStreams,
TranscodingStream,
using TranscodingStreams: TranscodingStream
using TestsForCodecPackages:
test_roundtrip_read,
test_roundtrip_write,
test_roundtrip_transcode,
test_roundtrip_lines,
test_roundtrip_transcode
test_roundtrip_seekstart,
test_roundtrip_fileio,
test_chunked_read,
test_chunked_write

@testset "Deflate Codec" begin

Expand All @@ -18,11 +21,12 @@ import TranscodingStreams:

test_roundtrip_read(DeflateCompressorStream, DeflateDecompressorStream)
test_roundtrip_write(DeflateCompressorStream, DeflateDecompressorStream)
test_roundtrip_lines(DeflateCompressorStream, DeflateDecompressorStream)
if isdefined(TranscodingStreams, :test_roundtrip_seekstart)
TranscodingStreams.test_roundtrip_seekstart(DeflateCompressorStream, DeflateDecompressorStream)
end
test_roundtrip_transcode(DeflateCompressor, DeflateDecompressor)
test_roundtrip_lines(DeflateCompressorStream, DeflateDecompressorStream)
test_roundtrip_seekstart(DeflateCompressorStream, DeflateDecompressorStream)
test_roundtrip_fileio(DeflateCompressor, DeflateDecompressor)
test_chunked_read(DeflateCompressor, DeflateDecompressor)
test_chunked_write(DeflateCompressor, DeflateDecompressor)

@test DeflateDecompressorStream <: TranscodingStream
end

0 comments on commit 35955d9

Please sign in to comment.