Skip to content

Commit

Permalink
Few more tests for AbstractChar (#56249)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and KristofferC committed Oct 21, 2024
1 parent 1f9d1c9 commit 5dd9574
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/char.jl
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ Base.codepoint(c::ASCIIChar) = reinterpret(UInt8, c)
@test string(ASCIIChar('x')) == "x"
@test length(ASCIIChar('x')) == 1
@test !isempty(ASCIIChar('x'))
@test ndims(ASCIIChar('x')) == 0
@test ndims(ASCIIChar) == 0
@test firstindex(ASCIIChar('x')) == 1
@test lastindex(ASCIIChar('x')) == 1
@test eltype(ASCIIChar) == ASCIIChar
@test_throws MethodError write(IOBuffer(), ASCIIChar('x'))
@test_throws MethodError read(IOBuffer('x'), ASCIIChar)
Expand Down

0 comments on commit 5dd9574

Please sign in to comment.