From 8fbed50acf1813a71204a9e64dd1cc464b7f8adf Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Sat, 19 Oct 2024 15:44:25 -0400 Subject: [PATCH] Few more tests for AbstractChar --- test/char.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/char.jl b/test/char.jl index 3100add0e81c5..5523125529031 100644 --- a/test/char.jl +++ b/test/char.jl @@ -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)