diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-01-20 23:30:45 +0100 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2015-01-20 23:30:45 +0100 |
commit | 51e77037f2adc4ffa7421aa36803a5874292b70d (patch) | |
tree | b295599c4a875a7c32b9a50ee3742714a6cb779c /test/files | |
parent | 5b347c51632c5724e5efaa0cdf473954289d7f4e (diff) | |
parent | c8393fdf44862cf09fca6ef4bc7899e7c0386f79 (diff) | |
download | scala-51e77037f2adc4ffa7421aa36803a5874292b70d.tar.gz scala-51e77037f2adc4ffa7421aa36803a5874292b70d.tar.bz2 scala-51e77037f2adc4ffa7421aa36803a5874292b70d.zip |
Merge pull request #4253 from retronym/ticket/9087
SI-9087 Fix min/max of reversed Double/Float orderings
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/scalacheck/nan-ordering.scala | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/files/scalacheck/nan-ordering.scala b/test/files/scalacheck/nan-ordering.scala index 2094a46e37..05e97a13c9 100644 --- a/test/files/scalacheck/nan-ordering.scala +++ b/test/files/scalacheck/nan-ordering.scala @@ -42,16 +42,16 @@ object Test extends Properties("NaN-Ordering") { property("Float equiv") = forAll(specFloats, specFloats) { (d1, d2) => numFloat.equiv(d1, d2) == (d1 == d2) } property("Float reverse.min") = forAll(specFloats, specFloats) { (d1, d2) => { - val mathmin = math.min(d1, d2) + val mathmax = math.max(d1, d2) val numericmin = numFloat.reverse.min(d1, d2) - mathmin == numericmin || mathmin.isNaN && numericmin.isNaN + mathmax == numericmin || mathmax.isNaN && numericmin.isNaN } } property("Float reverse.max") = forAll(specFloats, specFloats) { (d1, d2) => { - val mathmax = math.max(d1, d2) + val mathmin = math.min(d1, d2) val numericmax = numFloat.reverse.max(d1, d2) - mathmax == numericmax || mathmax.isNaN && numericmax.isNaN + mathmin == numericmax || mathmin.isNaN && numericmax.isNaN } } @@ -105,16 +105,16 @@ object Test extends Properties("NaN-Ordering") { property("Double equiv") = forAll(specDoubles, specDoubles) { (d1, d2) => numDouble.equiv(d1, d2) == (d1 == d2) } property("Double reverse.min") = forAll(specDoubles, specDoubles) { (d1, d2) => { - val mathmin = math.min(d1, d2) + val mathmax = math.max(d1, d2) val numericmin = numDouble.reverse.min(d1, d2) - mathmin == numericmin || mathmin.isNaN && numericmin.isNaN + mathmax == numericmin || mathmax.isNaN && numericmin.isNaN } } property("Double reverse.max") = forAll(specDoubles, specDoubles) { (d1, d2) => { - val mathmax = math.max(d1, d2) + val mathmin = math.min(d1, d2) val numericmax = numDouble.reverse.max(d1, d2) - mathmax == numericmax || mathmax.isNaN && numericmax.isNaN + mathmin == numericmax || mathmin.isNaN && numericmax.isNaN } } |