Provides a flexible assertion support, related to a debug level.
DEBUG_LEVEL == 1, should be suitable for a release version of the software, with inexpensive sanity checks.
DEBUG_LEVEL 2 and 3, encompass more expensive sanity checks that should only be made in debug mode.
DEBUG_LEVEL 4 is reserved to very expensive computation that should never be used except beside development.
Default debug level is 3 when java assertions are enabled (VM option "-ea") and 1 otherwise.
All assert methods have lazy evaluation of the all parameters, so invocation should be almost for free when above
the current DEBUG_LEVEL.
Assertion can be remove at compile time with "-Xelide-below" parameter to scalac.
Linear Supertypes
AnyRef, Any
Ordering
Alphabetic
By Inheritance
Inherited
exception
AnyRef
Any
Hide All
Show All
Visibility
Public
All
Value Members
final def!=(arg0: Any): Boolean
Definition Classes
AnyRef → Any
final def##(): Int
Definition Classes
AnyRef → Any
final def==(arg0: Any): Boolean
Definition Classes
AnyRef → Any
varDEBUG_LEVEL: Int
final defasInstanceOf[T0]: T0
Definition Classes
Any
final defassert1(assertion: ⇒ Boolean, message: ⇒ Any = {}): Unit
Annotations
@elidable(ASSERTION)@inline()
final defassert2(assertion: ⇒ Boolean, message: ⇒ Any = {}): Unit
Annotations
@elidable(FINE)@inline()
final defassert3(assertion: ⇒ Boolean, message: ⇒ Any = {}): Unit
Annotations
@elidable(FINER)@inline()
final defassert4(assertion: ⇒ Boolean, message: ⇒ Any = {}): Unit
Provides a flexible assertion support, related to a debug level.
DEBUG_LEVEL == 1, should be suitable for a release version of the software, with inexpensive sanity checks. DEBUG_LEVEL 2 and 3, encompass more expensive sanity checks that should only be made in debug mode. DEBUG_LEVEL 4 is reserved to very expensive computation that should never be used except beside development.
Default debug level is 3 when java assertions are enabled (VM option "-ea") and 1 otherwise.
All assert methods have lazy evaluation of the all parameters, so invocation should be almost for free when above the current DEBUG_LEVEL.
Assertion can be remove at compile time with "-Xelide-below" parameter to scalac.