summaryrefslogtreecommitdiff
path: root/test/files/run/t6223.scala
diff options
context:
space:
mode:
authorSimon Ochsenreither <simon@ochsenreither.de>2013-03-15 17:34:21 +0100
committerSimon Ochsenreither <simon@ochsenreither.de>2013-03-15 17:34:21 +0100
commitef85a105bd958e4f925fa524d15f8e63d5f4c1a9 (patch)
treed45ef902767c4a77f9cdead802c8c03dbf76e1a1 /test/files/run/t6223.scala
parentb7b4f877326acd6a8a24ff60fa1638cc18143c45 (diff)
downloadscala-ef85a105bd958e4f925fa524d15f8e63d5f4c1a9.tar.gz
scala-ef85a105bd958e4f925fa524d15f8e63d5f4c1a9.tar.bz2
scala-ef85a105bd958e4f925fa524d15f8e63d5f4c1a9.zip
SI-7258 Don't assume order of reflection values in t6223
test/files/run/t6223's check file expects a specific ordering of the reflected values. The ordering is not guaranteed by the runtime/reflection API and can change. Therefore, sort the values before comparing them.
Diffstat (limited to 'test/files/run/t6223.scala')
-rw-r--r--test/files/run/t6223.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/files/run/t6223.scala b/test/files/run/t6223.scala
index 4ab7c832e6..0996ea1c45 100644
--- a/test/files/run/t6223.scala
+++ b/test/files/run/t6223.scala
@@ -5,7 +5,7 @@ class Foo[@specialized(Int) A](a:A) {
object Test {
def main(args:Array[String]) {
val f = new Foo(333)
- val ms = f.getClass().getDeclaredMethods()
- ms.foreach(m => println(m.getName))
+ val ms = f.getClass().getDeclaredMethods().map(_.getName).sorted
+ ms.foreach(println)
}
}