mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
Improve scala compilation
This commit is contained in:
parent
b4c137e9dd
commit
fdee4f940f
@ -1,5 +1,7 @@
|
||||
package com.mysema.query.scala
|
||||
|
||||
import java.io.File._
|
||||
|
||||
import scala.tools.nsc._
|
||||
import scala.tools.nsc.interpreter.IR.Success
|
||||
import scala.io.Source.fromFile
|
||||
@ -16,10 +18,9 @@ trait CompileTestUtils {
|
||||
map (fromFile(_).mkString)
|
||||
mkString ("\n"))
|
||||
}
|
||||
|
||||
def assertCompileSuccess(source: String): Unit = {
|
||||
import java.io.File.pathSeparator
|
||||
|
||||
private lazy val env = {
|
||||
import java.io.File.pathSeparator
|
||||
val env = new Settings
|
||||
|
||||
val currentLibraries = (this.getClass.getClassLoader).asInstanceOf[java.net.URLClassLoader].getURLs().toList
|
||||
@ -28,7 +29,10 @@ trait CompileTestUtils {
|
||||
env.classpath.value = cp.mkString(pathSeparator)
|
||||
|
||||
env.usejavacp.value = true
|
||||
env
|
||||
}
|
||||
|
||||
def assertCompileSuccess(source: String): Unit = {
|
||||
val out = new java.io.ByteArrayOutputStream
|
||||
val interpreterWriter = new java.io.PrintWriter(out)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user