diff options
Diffstat (limited to 'test/scaladoc/scalacheck/IndexTest.scala')
-rw-r--r-- | test/scaladoc/scalacheck/IndexTest.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/scaladoc/scalacheck/IndexTest.scala b/test/scaladoc/scalacheck/IndexTest.scala index dc4ab126d4..abc0e5da01 100644 --- a/test/scaladoc/scalacheck/IndexTest.scala +++ b/test/scaladoc/scalacheck/IndexTest.scala @@ -12,19 +12,19 @@ object Test extends Properties("Index") { // this test previously relied on the assumption that the current thread's classloader is an url classloader and contains all the classpaths // does partest actually guarantee this? to quote Leonard Nimoy: The answer, of course, is no. // this test _will_ fail again some time in the future. - val paths = Thread.currentThread.getContextClassLoader.asInstanceOf[URLClassLoader].getURLs.map(u => URLDecoder.decode(u.getPath)) - val morepaths = Thread.currentThread.getContextClassLoader.getParent.asInstanceOf[URLClassLoader].getURLs.map(u => URLDecoder.decode(u.getPath)) - (paths ++ morepaths).mkString(java.io.File.pathSeparator) + // Footnote: java.lang.ClassCastException: org.apache.tools.ant.loader.AntClassLoader5 cannot be cast to java.net.URLClassLoader + val loader = Thread.currentThread.getContextClassLoader.asInstanceOf[URLClassLoader] + val paths = loader.getURLs.map(u => URLDecoder.decode(u.getPath)) + paths mkString java.io.File.pathSeparator } val docFactory = { val settings = new doc.Settings({Console.err.println(_)}) - + settings.scaladocQuietRun = true + settings.nowarn.value = true settings.classpath.value = getClasspath - println(settings.classpath.value) val reporter = new scala.tools.nsc.reporters.ConsoleReporter(settings) - new doc.DocFactory(reporter, settings) } |