You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Encode . decode property-based testing is done on every data type in TOML, but there is an issue involving non-ascii characters (č, ž, щ, ё). The reason why that test fails for them is that those characters are converted into \Uxxxxxxxx and during the decode phase, they are not decoded back.
The solution to this problem can be resolved in two ways:
change decoding phase to turn \Uxxxxxxxx into regular characters
change equal function that will say that č is equal to \U0000010d
I am a fan of the second approach because semantically speaking those two characters should be equal.
I have already added some non-ascii characters to the test file, but I am not referring it to it anywhere in the code, as you can see down there.
Encode . decode
property-based testing is done on every data type in TOML, but there is an issue involving non-ascii characters (č, ž, щ, ё). The reason why that test fails for them is that those characters are converted into\Uxxxxxxxx
and during the decode phase, they are not decoded back.The solution to this problem can be resolved in two ways:
\Uxxxxxxxx
into regular charactersč
is equal to\U0000010d
I am a fan of the second approach because semantically speaking those two characters should be equal.
I have already added some non-ascii characters to the test file, but I am not referring it to it anywhere in the code, as you can see down there.
tomland/test/Test/Toml/Gen.hs
Lines 304 to 318 in ee5b8fa
The text was updated successfully, but these errors were encountered: