enable run/fork-loader

This commit is contained in:
Adrien Piquerez 2024-03-27 14:09:30 +01:00
parent d9b024cf91
commit 2139a6a203
3 changed files with 11 additions and 11 deletions

View File

@ -1,8 +1,8 @@
object CheckLoader {
def main(args: Array[String]): Unit = apply()
def apply(): Unit = {
val loader = getClass.getClassLoader
val appLoader = ClassLoader.getSystemClassLoader
assert(loader eq appLoader, "Application classes not loaded in the system class loader")
}
def main(args: Array[String]): Unit = apply()
def apply(): Unit = {
val loader = getClass.getClassLoader
val appLoader = ClassLoader.getSystemClassLoader
assert(loader eq appLoader, "Application classes not loaded in the system class loader")
}
}

View File

@ -1,8 +1,8 @@
import org.scalacheck._
object TestForked extends Properties("Forked loader") {
property("Loaded from application loader") = Prop.secure {
CheckLoader()
true
}
}
property("Loaded from application loader") = Prop.secure {
CheckLoader()
true
}
}