Skip to content

Commit

Permalink
Add tests for UnknownCompressorException
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Jun 25, 2024
1 parent 96a93cc commit 7232211
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ using Test
@test_throws Zarr.UnknownCompressorException("asdf") zzeros(UInt8, 512, compressor="asdf")
d = Dict("id" => "zstd")
@test_throws Zarr.UnknownCompressorException("zstd") Zarr.getCompressor(d)

iob = IOBuffer()
show(iob, Zarr.UnknownCompressorException("zstd"))
@test "CodecZstd.jl" String(take!(iob))

iob = IOBuffer()
show(iob, Zarr.UnknownCompressorException("asdf"))
@test "issue" String(take!(iob))
@test Zarr.getCompressor(nothing) == Zarr.NoCompressor()
end

using CodecZstd
Expand Down

0 comments on commit 7232211

Please sign in to comment.