summaryrefslogtreecommitdiff
path: root/test/files/scalacheck/nan-ordering.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-9087 Fix min/max of reversed Double/Float orderingsJason Zaugg2015-01-201-8/+8
| | | | | | | | | | | | As diagnosed by the reporter, we needed additional overrides due to the way these orderings are implemented. I've added tests to show other methods and other orderings are working correctly. After writing that, I found a scalacheck test related to NaN handling that also covers `Ordering`. I had to correct the assertion in the tests of `reverse.{min,max}`.
* fixes #5104 and related NaN ordering inconsistenciesSzabolcs Berecz2011-12-251-0/+130
The bug was caused by the inconsistency between j.l.Math.min() and j.l.Double.compareTo() wrt NaN (j.l.Math.min() considers NaN to be less than any other value while j.l.Double.compareTo() says it's greater...) The fix changes Ordering.{FloatOrdering,DoubleOrdering) to base it's results on primitive comparisons and math.{min,max} instead of j.l.{Float,Double}.compareTo()