Skip to content

Commit 74c3b3f

Browse files
committed
test on invalid codec
1 parent 7edda72 commit 74c3b3f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,13 @@ using Base.Test
120120
@test_throws ArgumentError TranscodingStream(Identity(), IOBuffer(), bufsize=0)
121121
end
122122

123+
# This does not implement necessary interface methods.
124+
struct InvalidCodec <: TranscodingStreams.Codec end
125+
126+
@testset "Invalid Codec" begin
127+
@test_throws MethodError read(TranscodingStream(InvalidCodec(), IOBuffer()))
128+
end
129+
123130
for pkg in ["CodecZlib", "CodecBzip2", "CodecXz", "CodecZstd"]
124131
Pkg.test(pkg)
125132
end

0 commit comments

Comments
 (0)