summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorHubert Plociniczak <hubert.plociniczak@gmail.com>2012-07-17 17:57:05 +0200
committerHubert Plociniczak <hubert.plociniczak@gmail.com>2012-07-17 18:00:11 +0200
commited9669f57a77f787b2ed8d2cad2561e57f17dc5c (patch)
tree1db0c07491d0d75022d9284d931ea25f81af7e73 /test/files
parent0cfd858a38ddf0ac83d9bbefe85110f88dc707c0 (diff)
downloadscala-ed9669f57a77f787b2ed8d2cad2561e57f17dc5c.tar.gz
scala-ed9669f57a77f787b2ed8d2cad2561e57f17dc5c.tar.bz2
scala-ed9669f57a77f787b2ed8d2cad2561e57f17dc5c.zip
Fixes SI-5588. Correct compare for Enumeration.
Slower than the original one but does comparison in the same spirit as IntOrdering. Review by @axel22.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/run/t5588.check2
-rw-r--r--test/files/run/t5588.scala14
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/run/t5588.check b/test/files/run/t5588.check
new file mode 100644
index 0000000000..bb101b641b
--- /dev/null
+++ b/test/files/run/t5588.check
@@ -0,0 +1,2 @@
+true
+true
diff --git a/test/files/run/t5588.scala b/test/files/run/t5588.scala
new file mode 100644
index 0000000000..f214d16684
--- /dev/null
+++ b/test/files/run/t5588.scala
@@ -0,0 +1,14 @@
+object Test {
+ object MyEnum extends Enumeration {
+ val Foo = Value(2000000000)
+ val Bar = Value(-2000000000)
+ val X = Value(Integer.MAX_VALUE)
+ val Y = Value(Integer.MIN_VALUE)
+ }
+
+ import MyEnum._
+ def main(args: Array[String]) {
+ println(Foo > Bar)
+ println(X > Y)
+ }
+}