diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-04-23 12:19:16 -0700 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-04-23 12:19:16 -0700 |
commit | 78ef7b4305e93e1de812c98ab6d7984f68baed97 (patch) | |
tree | aa6b44bccd92d8e86824c970adf68ce0fdae0334 | |
parent | 1d54f26b9a87c8df6a3b0e4472147d1ffb9037f1 (diff) | |
parent | 5c6d62a675c7df615d2beee731e87fe15b6b31cd (diff) | |
download | scala-78ef7b4305e93e1de812c98ab6d7984f68baed97.tar.gz scala-78ef7b4305e93e1de812c98ab6d7984f68baed97.tar.bz2 scala-78ef7b4305e93e1de812c98ab6d7984f68baed97.zip |
Merge pull request #2433 from soc/SI-7408
SI-7408 Fix test by sorting results of getDeclaredClasses
-rw-r--r-- | test/files/run/t4023.scala | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/test/files/run/t4023.scala b/test/files/run/t4023.scala index 4846fa31b4..38190cfa5c 100644 --- a/test/files/run/t4023.scala +++ b/test/files/run/t4023.scala @@ -7,17 +7,28 @@ object Test { object B5 extends B1 private object B6 extends B2 - val valuesTry1 = this.getClass.getDeclaredClasses - val valuesTry2 = C.getClass.getDeclaredClasses - val valuesTry3 = getClass.getDeclaredClasses + val classes1 = this.getClass.getDeclaredClasses + val classes2 = C.getClass .getDeclaredClasses + val classes3 = getClass .getDeclaredClasses + } + + // sortBy(_.getName) introduces additional classes which we don't want to see in C, + // so we call sortBy outside of C. + object TestHelper { + val valuesTry1 = C.classes1.sortBy(_.getName) + val valuesTry2 = C.classes2.sortBy(_.getName) + val valuesTry3 = C.classes3.sortBy(_.getName) } def main(args: Array[String]) { - println("Try 1: (" + C.valuesTry1.length + " classes)") - C.valuesTry1.foreach(println) - println("Try 2: (" + C.valuesTry2.length + " classes)") - C.valuesTry2.foreach(println) - println("Try 3: (" + C.valuesTry3.length + " classes)") - C.valuesTry3.foreach(println) + println("Try 1: (" + TestHelper.valuesTry1.length + " classes)") + TestHelper.valuesTry1.foreach(println) + println("Try 2: (" + TestHelper.valuesTry2.length + " classes)") + TestHelper.valuesTry2.foreach(println) + println("Try 3: (" + TestHelper.valuesTry3.length + " classes)") + TestHelper.valuesTry3.foreach(println) } -}
\ No newline at end of file + + +} + |