Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit ef85a105bd958e4f925fa524d15f8e63d5f4c1a9 1 parent b7b4f87
@soc soc authored
Showing with 3 additions and 3 deletions.
  1. +1 −1  test/files/run/t6223.check
  2. +2 −2 test/files/run/t6223.scala
View
2  test/files/run/t6223.check
@@ -1,4 +1,4 @@
bar
-bar$mcI$sp
bar$mIc$sp
bar$mIcI$sp
+bar$mcI$sp
View
4 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)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.