Closed OptimumCode closed 3 months ago
@sschuberth please, take a look at the PR when you have time.
Done, though I'm not sure why, as I have no approval rights on this repo 😉
Thank you for your review @sschuberth! I wanted to tag @charleskorn but he does not appear in the completion list for some reason, and I accidentally tagged you instead)) don't know why - probably because it is a bit late here already)
I accidentally tagged you instead
No worries, I hope my review was useful still 😸
No worries, I hope my review was useful still 😸
It definitely was! Thanks again
Thanks @OptimumCode and @sschuberth!
Hi, this PR allows running tests for JS targets.
The old version of tests had the following problems:
It is incorrect to compare NaN to another NaN using
==
operator. For JavaFloat.NaN == Float.NaN
returnsfalse
(butObjects.equals(Float.NaN, Float.NaN)
returnstrue
, which is why tests work for Java). For JS it is a bit different.For NaN comparison,
equals
call was replaced withisNaN()
method call.The hex and octal numbers are valid floating point numbers for JS (because under the hood Kotlin delegates conversion to JS dynamic cast). This is the
toDouble
implementation for JS platformTests for those values are ignored for JS platform.
@sschuberth please, take a look at the PR when you have time. Thank you!