From ef85a105bd958e4f925fa524d15f8e63d5f4c1a9 Mon Sep 17 00:00:00 2001 From: Simon Ochsenreither Date: Fri, 15 Mar 2013 17:34:21 +0100 Subject: 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. --- test/files/run/t6223.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/run/t6223.scala') 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) } } -- cgit v1.2.3