|
1 | 1 | using CodecBzip2 |
2 | | -using Random |
3 | | -if VERSION > v"0.7-" |
4 | | - using Test |
5 | | -else |
6 | | - using Base.Test |
7 | | -end |
| 2 | +using Test |
8 | 3 | import TranscodingStreams |
| 4 | +using TestsForCodecPackages: |
| 5 | + test_roundtrip_read, |
| 6 | + test_roundtrip_write, |
| 7 | + test_roundtrip_transcode, |
| 8 | + test_roundtrip_lines, |
| 9 | + test_roundtrip_seekstart |
9 | 10 |
|
10 | 11 | @testset "Bzip2 Codec" begin |
11 | 12 | codec = Bzip2Compressor() |
@@ -35,13 +36,11 @@ import TranscodingStreams |
35 | 36 | @test Bzip2CompressorStream <: TranscodingStreams.TranscodingStream |
36 | 37 | @test Bzip2DecompressorStream <: TranscodingStreams.TranscodingStream |
37 | 38 |
|
38 | | - TranscodingStreams.test_roundtrip_read(Bzip2CompressorStream, Bzip2DecompressorStream) |
39 | | - TranscodingStreams.test_roundtrip_write(Bzip2CompressorStream, Bzip2DecompressorStream) |
40 | | - TranscodingStreams.test_roundtrip_lines(Bzip2CompressorStream, Bzip2DecompressorStream) |
41 | | - if isdefined(TranscodingStreams, :test_roundtrip_seekstart) |
42 | | - TranscodingStreams.test_roundtrip_seekstart(Bzip2CompressorStream, Bzip2DecompressorStream) |
43 | | - end |
44 | | - TranscodingStreams.test_roundtrip_transcode(Bzip2Compressor, Bzip2Decompressor) |
| 39 | + test_roundtrip_read(Bzip2CompressorStream, Bzip2DecompressorStream) |
| 40 | + test_roundtrip_write(Bzip2CompressorStream, Bzip2DecompressorStream) |
| 41 | + test_roundtrip_lines(Bzip2CompressorStream, Bzip2DecompressorStream) |
| 42 | + test_roundtrip_seekstart(Bzip2CompressorStream, Bzip2DecompressorStream) |
| 43 | + test_roundtrip_transcode(Bzip2Compressor, Bzip2Decompressor) |
45 | 44 |
|
46 | 45 | @test_throws ArgumentError Bzip2Compressor(blocksize100k=10) |
47 | 46 | @test_throws ArgumentError Bzip2Compressor(workfactor=251) |
|
0 commit comments