Skip to content

Commit 31cf742

Browse files
authored
use TestsForCodecPackages.jl (#61)
1 parent 34dd3d8 commit 31cf742

File tree

3 files changed

+23
-21
lines changed

3 files changed

+23
-21
lines changed

Project.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uuid = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
33
license = "MIT"
44
authors = ["Kenta Sato <[email protected]>",
55
"JuliaIO Github Organization"]
6-
version = "0.8.4"
6+
version = "0.8.5"
77

88
[deps]
99
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
@@ -13,10 +13,3 @@ Zstd_jll = "3161d3a3-bdf6-5164-811a-617609db77b4"
1313
TranscodingStreams = "0.9, 0.10, 0.11"
1414
Zstd_jll = "1.5.5"
1515
julia = "1.3"
16-
17-
[extras]
18-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
19-
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
20-
21-
[targets]
22-
test = ["Test", "Random"]

test/Project.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[deps]
2+
CodecZstd = "6b39b394-51ab-5f42-8807-6242bab2b4c2"
3+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5+
TestsForCodecPackages = "c2e61002-3542-480d-8b3c-5f05cc4f8554"
6+
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"

test/runtests.jl

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
using CodecZstd
22
using Random
33
using TranscodingStreams
4+
using TestsForCodecPackages:
5+
test_roundtrip_read,
6+
test_roundtrip_write,
7+
test_roundtrip_transcode,
8+
test_roundtrip_lines,
9+
test_roundtrip_seekstart
410
using Test
511

612
Random.seed!(1234)
@@ -39,21 +45,18 @@ Random.seed!(1234)
3945
@test ZstdCompressorStream <: TranscodingStreams.TranscodingStream
4046
@test ZstdDecompressorStream <: TranscodingStreams.TranscodingStream
4147

42-
TranscodingStreams.test_roundtrip_read(ZstdCompressorStream, ZstdDecompressorStream)
43-
TranscodingStreams.test_roundtrip_write(ZstdCompressorStream, ZstdDecompressorStream)
44-
TranscodingStreams.test_roundtrip_lines(ZstdCompressorStream, ZstdDecompressorStream)
45-
TranscodingStreams.test_roundtrip_transcode(ZstdCompressor, ZstdDecompressor)
48+
test_roundtrip_read(ZstdCompressorStream, ZstdDecompressorStream)
49+
test_roundtrip_write(ZstdCompressorStream, ZstdDecompressorStream)
50+
test_roundtrip_lines(ZstdCompressorStream, ZstdDecompressorStream)
51+
test_roundtrip_transcode(ZstdCompressor, ZstdDecompressor)
52+
test_roundtrip_seekstart(ZstdCompressorStream, ZstdDecompressorStream)
4653

4754
frame_encoder = io -> TranscodingStream(ZstdFrameCompressor(), io)
48-
TranscodingStreams.test_roundtrip_read(frame_encoder, ZstdDecompressorStream)
49-
TranscodingStreams.test_roundtrip_write(frame_encoder, ZstdDecompressorStream)
50-
TranscodingStreams.test_roundtrip_lines(frame_encoder, ZstdDecompressorStream)
51-
TranscodingStreams.test_roundtrip_transcode(ZstdFrameCompressor, ZstdDecompressor)
52-
53-
if isdefined(TranscodingStreams, :test_roundtrip_seekstart)
54-
TranscodingStreams.test_roundtrip_seekstart(ZstdCompressorStream, ZstdDecompressorStream)
55-
TranscodingStreams.test_roundtrip_seekstart(frame_encoder, ZstdDecompressorStream)
56-
end
55+
test_roundtrip_read(frame_encoder, ZstdDecompressorStream)
56+
test_roundtrip_write(frame_encoder, ZstdDecompressorStream)
57+
test_roundtrip_lines(frame_encoder, ZstdDecompressorStream)
58+
test_roundtrip_transcode(ZstdFrameCompressor, ZstdDecompressor)
59+
test_roundtrip_seekstart(frame_encoder, ZstdDecompressorStream)
5760

5861
@testset "ZstdFrameCompressor streaming edge case" begin
5962
codec = ZstdFrameCompressor()

0 commit comments

Comments
 (0)