Skip to content

Commit

Permalink
test error printing
Browse files Browse the repository at this point in the history
  • Loading branch information
nhz2 committed Jul 27, 2024
1 parent 67ecedc commit f39e76f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

include("utils.jl")

@testset "error printing" begin
@test sprint(io-> Base.showerror(io, DecompressionError("invalid block compression mode 3"))) == "DecompressionError: invalid block compression mode 3"
end

@testset "decompressing corrupt input with $(decompress)" for decompress in (decompress, decompress_bytes)
# HEADER_BITS
@test_throws DecompressionError("invalid block compression mode 3") decompress([0b111, 0x00])
Expand Down

0 comments on commit f39e76f

Please sign in to comment.