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 { object CheckLoader {
def main(args: Array[String]): Unit = apply() def main(args: Array[String]): Unit = apply()
def apply(): Unit = { def apply(): Unit = {
val loader = getClass.getClassLoader val loader = getClass.getClassLoader
val appLoader = ClassLoader.getSystemClassLoader val appLoader = ClassLoader.getSystemClassLoader
assert(loader eq appLoader, "Application classes not loaded in the system class loader") assert(loader eq appLoader, "Application classes not loaded in the system class loader")
} }
} }

View File

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