diff --git a/Project.toml b/Project.toml index 0ade7a5..3953344 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "CodecZlib" uuid = "944b1d66-785c-5afd-91f1-9de20f533193" license = "MIT" authors = ["Kenta Sato "] -version = "0.7.5" +version = "0.7.6" [deps] TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" @@ -11,10 +11,3 @@ Zlib_jll = "83775a58-1f1d-513f-b197-d71354ab007a" [compat] TranscodingStreams = "0.9, 0.10, 0.11" julia = "1.3" - -[extras] -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" - -[targets] -test = ["Test", "Random"] diff --git a/test/Project.toml b/test/Project.toml new file mode 100644 index 0000000..e4fbbc4 --- /dev/null +++ b/test/Project.toml @@ -0,0 +1,5 @@ +[deps] +CodecZlib = "944b1d66-785c-5afd-91f1-9de20f533193" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +TestsForCodecPackages = "c2e61002-3542-480d-8b3c-5f05cc4f8554" +TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" diff --git a/test/runtests.jl b/test/runtests.jl index 6e2fb52..8c8d879 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,17 @@ using CodecZlib -using Random using Test -import TranscodingStreams: +using TranscodingStreams: TranscodingStreams, - TranscodingStream, + 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 const testdir = @__DIR__ @@ -106,9 +110,7 @@ const testdir = @__DIR__ test_roundtrip_read(GzipCompressorStream, GzipDecompressorStream) test_roundtrip_write(GzipCompressorStream, GzipDecompressorStream) test_roundtrip_lines(GzipCompressorStream, GzipDecompressorStream) - if isdefined(TranscodingStreams, :test_roundtrip_seekstart) - TranscodingStreams.test_roundtrip_seekstart(GzipCompressorStream, GzipDecompressorStream) - end + test_roundtrip_seekstart(GzipCompressorStream, GzipDecompressorStream) test_roundtrip_transcode(GzipCompressor, GzipDecompressor) @test_throws ArgumentError GzipCompressor(level=10) @@ -189,9 +191,7 @@ end test_roundtrip_read(ZlibCompressorStream, ZlibDecompressorStream) test_roundtrip_write(ZlibCompressorStream, ZlibDecompressorStream) test_roundtrip_lines(ZlibCompressorStream, ZlibDecompressorStream) - if isdefined(TranscodingStreams, :test_roundtrip_seekstart) - TranscodingStreams.test_roundtrip_seekstart(ZlibCompressorStream, ZlibDecompressorStream) - end + test_roundtrip_seekstart(ZlibCompressorStream, ZlibDecompressorStream) test_roundtrip_transcode(ZlibCompressor, ZlibDecompressor) @test_throws ArgumentError ZlibCompressor(level=10) @@ -216,9 +216,7 @@ end 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_seekstart(DeflateCompressorStream, DeflateDecompressorStream) test_roundtrip_transcode(DeflateCompressor, DeflateDecompressor) @test DeflateCompressorStream <: TranscodingStream @@ -231,9 +229,9 @@ end # Test APIs of TranscodingStreams.jl using the gzip compressor/decompressor. @testset "TranscodingStreams" begin - TranscodingStreams.test_chunked_read(GzipCompressor, GzipDecompressor) - TranscodingStreams.test_chunked_write(GzipCompressor, GzipDecompressor) - TranscodingStreams.test_roundtrip_fileio(GzipCompressor, GzipDecompressor) + test_chunked_read(GzipCompressor, GzipDecompressor) + test_chunked_write(GzipCompressor, GzipDecompressor) + test_roundtrip_fileio(GzipCompressor, GzipDecompressor) @testset "seek" begin data = transcode(GzipCompressor, Vector(b"abracadabra"))