CodecSuite
trait ScalaCheckSuite
class FunSuite
trait ValueTransforms
trait SuiteTransforms
trait TestTransforms
trait TestOptionsConversions
trait FunFixtures
trait Assertions
trait CompileErrorMacro
class Suite
trait PlatformSuite
class Object
trait Matchable
class Any
Type members
Inherited classlikes
final class SuiteTransform(val name: String, fn: List[Test] => List[Test])
- Inhertied from
- SuiteTransforms
final class ValueTransform(val name: String, fn: PartialFunction[Any, Future[Any]])
- Inhertied from
- ValueTransforms
Value members
Methods
protected def shouldDecodeFullyTo[A](codec: Codec[A], buf: BitVector, expected: A)(using Location): Unit
Inherited methods
def afterAll(): Unit
Runs once after all test cases and after all suite-local fixtures have been tear down.
- Inhertied from
- Suite
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(loc: Location, ev: A =:= B): Unit
- Inhertied from
- Assertions
def beforeAll(): Unit
Runs once before all test cases and before all suite-local fixtures are setup.
An error in this method aborts the test suite.
An error in this method aborts the test suite.
- Inhertied from
- Suite
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(loc: Location): Nothing
- Inhertied from
- Assertions
override def munitTestTransforms: List[TestTransform]
- Definition Classes
- ScalaCheckSuite -> TestTransforms
- Inhertied from
- ScalaCheckSuite
def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(loc: Location): Unit
Asserts that two floats are equal to within a positive delta.
If the expected value is infinity then the delta value is ignored.
NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.
If the expected value is infinity then the delta value is ignored.
NaNs are considered equal: assertEquals(Float.NaN, Float.NaN, *) passes.
- Inhertied from
- Assertions
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(T: ClassTag[T], loc: Location): T
- Inhertied from
- Assertions
def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(loc: Location, ev: B <:< A): Unit
Asserts that two elements are equal using
==
equality.The "expected" value (second argument) must have the same type or be a
subtype of the "obtained" value (first argument). For example:
{{{
assertEquals(Option(1), Some(1)) // OK
assertEquals(Some(1), Option(1)) // Error: Option[Int] is not a subtype of Some[Int]
}}}
subtype of the "obtained" value (first argument). For example:
{{{
assertEquals(Option(1), Some(1)) // OK
assertEquals(Some(1), Option(1)) // Error: Option[Int] is not a subtype of Some[Int]
}}}
Use
values of different types. For example:
{{{
val a: Either[List[String] , Int] = Right(42)
val b: Either[String, Int] = Right(42)
assertEquals[Any, Any] (a, b) // OK
assertEquals(a, b) // Error: Either[String, Int] is not a subtype of Either[List[String] , Int]
}}}
assertEquals[Any, Any](a, b)
as an escape hatch to compare twovalues of different types. For example:
{{{
val a: Either[List[String] , Int] = Right(42)
val b: Either[String, Int] = Right(42)
assertEquals[Any, Any] (a, b) // OK
assertEquals(a, b) // Error: Either[String, Int] is not a subtype of Either[List[String] , Int]
}}}
- Inhertied from
- Assertions
def assertNoDiff(obtained: String, expected: String, clue: => Any)(loc: Location): Unit
- Inhertied from
- Assertions
def munitFixtures: Seq[Fixture[]]
Functinonal fixtures that can be reused for individual test cases or entire suites.
- Inhertied from
- Suite
def beforeEach(context: BeforeEach): Unit
Runs before each individual test case.
An error in this method aborts the test case.
An error in this method aborts the test case.
- Inhertied from
- Suite
def munit$ScalaCheckSuite$$super$munitTestTransforms: List[TestTransform]
- Inhertied from
- ScalaCheckSuite
def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(loc: Location): Unit
Asserts that two doubles are equal to within a positive delta.
If the expected value is infinity then the delta value is ignored.
NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.
If the expected value is infinity then the delta value is ignored.
NaNs are considered equal: assertEquals(Double.NaN, Double.NaN, *) passes.
- Inhertied from
- Assertions