Skip to content

Commit 072dd7a

Browse files
authored
use TestsForCodecPackages.jl (#34)
1 parent 8dd665c commit 072dd7a

3 files changed

Lines changed: 18 additions & 22 deletions

File tree

Project.toml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,13 @@ name = "CodecBzip2"
22
uuid = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
33
license = "MIT"
44
authors = ["Kenta Sato <bicycle1885@gmail.com>"]
5-
version = "0.8.3"
5+
version = "0.8.4"
66

77
[deps]
88
Bzip2_jll = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
9-
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
109
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"
1110

1211
[compat]
1312
Bzip2_jll = "1.0.8"
1413
TranscodingStreams = "0.9, 0.10, 0.11"
1514
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
CodecBzip2 = "523fee87-0ab8-5b00-afb7-3ecf72e48cfd"
3+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4+
TestsForCodecPackages = "c2e61002-3542-480d-8b3c-5f05cc4f8554"
5+
TranscodingStreams = "3bb67fe8-82b1-5028-8e26-92a6c54297fa"

test/runtests.jl

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
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
83
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
910

1011
@testset "Bzip2 Codec" begin
1112
codec = Bzip2Compressor()
@@ -35,13 +36,11 @@ import TranscodingStreams
3536
@test Bzip2CompressorStream <: TranscodingStreams.TranscodingStream
3637
@test Bzip2DecompressorStream <: TranscodingStreams.TranscodingStream
3738

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)
4544

4645
@test_throws ArgumentError Bzip2Compressor(blocksize100k=10)
4746
@test_throws ArgumentError Bzip2Compressor(workfactor=251)

0 commit comments

Comments
 (0)