summaryrefslogtreecommitdiff
path: root/test/files/run/t6331.check
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-09-08 18:43:22 +0200
committerJason Zaugg <jzaugg@gmail.com>2012-09-08 18:52:51 +0200
commit815f60ff9c50d22a23fbc9d980570fb6941a7d71 (patch)
treea313adaf9493d35eecb858c1d6bcdba6e272979f /test/files/run/t6331.check
parentc619f94a9cfbddc12c9c5df3affb4636f8982a0a (diff)
downloadscala-815f60ff9c50d22a23fbc9d980570fb6941a7d71.tar.gz
scala-815f60ff9c50d22a23fbc9d980570fb6941a7d71.tar.bz2
scala-815f60ff9c50d22a23fbc9d980570fb6941a7d71.zip
Refine equality of Constant types over floating point values.
The constant types for 0d and -0d should not be equal. This is implemented by checking equality of the result of doubleToRawLongBits / floatToRawIntBits, which also correctly considers two NaNs of the same flavour to be equal. Followup to SI-6331.
Diffstat (limited to 'test/files/run/t6331.check')
-rw-r--r--test/files/run/t6331.check23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/files/run/t6331.check b/test/files/run/t6331.check
new file mode 100644
index 0000000000..9bf3f7823a
--- /dev/null
+++ b/test/files/run/t6331.check
@@ -0,0 +1,23 @@
+ () == ()
+ true == true
+ true != false
+ false != true
+ 0.toByte == 0.toByte
+ 0.toByte != 1.toByte
+ 0.toShort == 0.toShort
+ 0.toShort != 1.toShort
+ 0 == 0
+ 0 != 1
+ 0L == 0L
+ 0L != 1L
+ 0.0f == 0.0f
+ 0.0f != -0.0f
+ -0.0f != 0.0f
+ NaNf == NaNf
+ 0.0d == 0.0d
+ 0.0d != -0.0d
+ -0.0d != 0.0d
+ NaNd == NaNd
+ 0 != 0.0d
+ 0 != 0L
+ 0.0d != 0.0f