Skip to content

Commit

Permalink
Even MORE tests for transcode (JuliaLang#55649)
Browse files Browse the repository at this point in the history
Missed 4 byte UTF-8, transcoding string to string, and transcoding to
signed integers
  • Loading branch information
kshyatt authored Aug 31, 2024
2 parents 1328325 + 3b97dda commit f5b955e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/strings/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1398,9 +1398,14 @@ end
str_2 = "αβγ"
# string starting with a 3 byte UTF-8 character
str_3 = "आख"
@testset for str in (str_1, str_2, str_3)
# string starting with a 4 byte UTF-8 character
str_4 = "𒃵𒃰"
@testset for str in (str_1, str_2, str_3, str_4)
@test transcode(String, str) === str
@test transcode(String, transcode(UInt16, str)) == str
@test transcode(String, transcode(UInt16, transcode(UInt8, str))) == str
@test transcode(String, transcode(Int32, transcode(UInt8, str))) == str
@test transcode(String, transcode(UInt32, transcode(UInt8, str))) == str
@test transcode(String, transcode(UInt8, transcode(UInt16, str))) == str
end
end

0 comments on commit f5b955e

Please sign in to comment.