Skip to content

Commit

Permalink
Some small tests for transcode (#55436)
Browse files Browse the repository at this point in the history
This logic appears to be
[uncovered](https://app.codecov.io/gh/JuliaLang/julia/blob/master/base%2Fstrings%2Fcstring.jl#L232)
although it does have a doctest! Running the tests locally managed to
trigger these functions.
  • Loading branch information
kshyatt authored Aug 17, 2024
1 parent faa6095 commit 4aa9dfa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/strings/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1388,3 +1388,10 @@ end
end
end
end

@testset "transcode" begin
str = "αβγ"
@test transcode(String, transcode(UInt16, str)) == str
@test transcode(String, transcode(UInt16, transcode(UInt8, str))) == str
@test transcode(String, transcode(UInt8, transcode(UInt16, str))) == str
end

0 comments on commit 4aa9dfa

Please sign in to comment.