scala.scalanative.junit.plugin

Members list

Type members

Classlikes

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
final class JUnitDefinitions()(using ctx: Context)

Definitions required by JUnit plugin

Definitions required by JUnit plugin

Scala.js port based on dotty.tools.backend.sjs.JSDefinitions#junit from Scala release 3.1.0. It contains the same definitions as original class which cannot be used directly in Scala Native plugin

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
class ScalaNativeJUnitBootstrappers extends PluginPhase

Generates JUnit bootstrapper objects for Scala Native

Generates JUnit bootstrapper objects for Scala Native

Scala Native similarly as Scala.js cannot use reflection to invoke JUnit tests, instead it injects bootstrapper classes responsible for running them.

This phase is a port of dotty.tools.dotc.transform.sjs.JUnitBootstrappers based on release 3.1.0. Actual transformation logic is the same. Unfortunately we cannot use sjs implementation directly, because JsDefinitions assumes usage of JsPlatform which is absent in SN compiler plugin.

Additionally this port differs from Scala.js implementation by supporting test suite wide ignore (ported from Scala 2 Native compiler plugin)

Attributes

Supertypes
trait PluginPhase
class MiniPhase
class Phase
class Object
trait Matchable
class Any
Show all
class ScalaNativeJUnitPlugin extends StandardPlugin

The Scala Native JUnit plugin replaces reflection based test lookup.

The Scala Native JUnit plugin replaces reflection based test lookup.

For each JUnit test my.pkg.X, it generates a bootstrapper module/object my.pkg.X$scalanative$junit$bootstrapper implementing scala.scalanative.junit.Bootstrapper.

The test runner uses these objects to obtain test metadata and dispatch to relevant methods.

Attributes

Supertypes
trait StandardPlugin
trait Plugin
class Object
trait Matchable
class Any