CodecSuite

abstract class CodecSuite extends ScalaCheckSuite
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
object FunFixture
Inhertied from
FunFixtures
final class ValueTransform(val name: String, fn: PartialFunction[Any, Future[Any]])
Inhertied from
ValueTransforms
class FunFixture[T]
Inhertied from
FunFixtures
final class TestTransform(val name: String, fn: Test => Test)
Inhertied from
TestTransforms
abstract class Fixture[T](val fixtureName: String)
Value Params
name
The name of this fixture, used for displaying an error message if
beforeAll() or afterAll() fail.
Inhertied from
Suite

Inherited types

final type BeforeEach = GenericBeforeEach[TestValue]
Inhertied from
Suite
final type TestValue = Future[Any]
Inhertied from
FunSuite
final type Test = GenericTest[TestValue]
Inhertied from
Suite
final type AfterEach = GenericAfterEach[TestValue]
Inhertied from
Suite

Value members

Methods

override def scalaCheckTestParameters: Parameters
Definition Classes
ScalaCheckSuite
protected def roundtrip[A](a: A)(using c: Codec[A], l: Location): Unit
protected def roundtrip[A](codec: Codec[A], value: A)(using Location): Unit
protected def roundtripAll[A](codec: Codec[A], as: Iterable[A])(using Location): Unit
protected def encodeError[A](codec: Codec[A], a: A, err: Err)(using Location): Unit
protected def shouldDecodeFullyTo[A](codec: Codec[A], buf: BitVector, expected: A)(using Location): Unit
protected def time[A](f: => A): (A, FiniteDuration)
protected def samples[A](gen: Gen[A]): LazyList[Option[A]]
protected def definedSamples[A](gen: Gen[A]): LazyList[A]
protected def assertBitsEqual(actual: BitVector, expected: BitVector)(using Location): Unit

Inherited methods

final def munitIgnoreSuiteTransform: SuiteTransform
Inhertied from
SuiteTransforms
final def munitOnlySuiteTransform: SuiteTransform
Inhertied from
SuiteTransforms
def failSuite(message: String, clues: Clues)(loc: Location): Nothing
Inhertied from
Assertions
def fail(message: String, clues: Clues)(loc: Location): Nothing
Inhertied from
Assertions
def fail(message: String, cause: Throwable)(loc: Location): Nothing
Inhertied from
Assertions
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(loc: Location): Nothing
Inhertied from
Assertions
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.
Inhertied from
Assertions
protected def scalaCheckInitialSeed: String
Inhertied from
ScalaCheckSuite
def munitCaptureClues[T](thunk: => T): (T, Clues)
Inhertied from
Assertions
inline def compileErrors(inline code: String): String
Inhertied from
CompileErrorMacro
def munitTimeout: Duration
Inhertied from
FunSuite
def munitFlakyOK: Boolean
Inhertied from
TestTransforms
def assume(cond: Boolean, clue: => Any)(loc: Location): Unit
Inhertied from
Assertions
def clue[T](c: Clue[T]): T
Inhertied from
Assertions
def assertNoDiff(obtained: String, expected: String, clue: => Any)(loc: Location): Unit
Inhertied from
Assertions
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(T: ClassTag[T], loc: Location): T
Inhertied from
Assertions
def munitSuiteTransforms: List[SuiteTransform]
Inhertied from
SuiteTransforms
def munitFixtures: Seq[Fixture[]]
Functinonal fixtures that can be reused for individual test cases or entire suites.
Inhertied from
Suite
def munitValueTransforms: List[ValueTransform]
Inhertied from
ValueTransforms
final def munitFailTransform: TestTransform
Inhertied from
TestTransforms
def test(options: TestOptions)(body: => Any)(loc: Location): Unit
Inhertied from
FunSuite
def test(name: String)(body: => Any)(loc: Location): Unit
Inhertied from
FunSuite
def munitAnsiColors: Boolean
Inhertied from
Assertions
def munit$ScalaCheckSuite$$super$munitTestTransforms: List[TestTransform]
Inhertied from
ScalaCheckSuite
def property(options: TestOptions)(body: => Prop)(loc: Location): Unit
Inhertied from
ScalaCheckSuite
def property(name: String)(body: => Prop)(loc: Location): Unit
Inhertied from
ScalaCheckSuite
def munitTests(): Seq[Test]
Inhertied from
FunSuite
final def munitSuiteTransform(tests: List[Test]): List[Test]
Inhertied from
SuiteTransforms
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.
Inhertied from
Suite
def beforeEach(context: BeforeEach): Unit
Runs before each individual test case.
An error in this method aborts the test case.
Inhertied from
Suite
def munitExecutionContext: ExecutionContext
Inhertied from
Suite
def afterEach(context: AfterEach): Unit
Runs after each individual test case.
Inhertied from
Suite
override def munitTestTransforms: List[TestTransform]
Definition Classes
ScalaCheckSuite -> TestTransforms
Inhertied from
ScalaCheckSuite
final def munitTestTransform(test: Test): Test
Inhertied from
TestTransforms
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]
}}}
Use assertEquals[Any, Any](a, b) as an escape hatch to compare two
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]
}}}
Inhertied from
Assertions
def intercept[T <: Throwable](body: => Any)(T: ClassTag[T], loc: Location): T
Inhertied from
Assertions
def munitPrint(clue: => Any): String
Inhertied from
Assertions
def munitIgnore: Boolean
Inhertied from
SuiteTransforms
final def munitFutureTransform: ValueTransform
Inhertied from
ValueTransforms
def afterAll(): Unit
Runs once after all test cases and after all suite-local fixtures have been tear down.
Inhertied from
Suite
protected def scalaCheckPrettyParameters: Params
Inhertied from
ScalaCheckSuite
final def munitFlakyTransform: TestTransform
Inhertied from
TestTransforms
def assert(cond: => Boolean, clue: => Any)(loc: Location): Unit
Inhertied from
Assertions
final def munitValueTransform(testValue: => Any): Future[Any]
Inhertied from
ValueTransforms
def clues(clue: Clue[]*): Clues
Inhertied from
Assertions
def isCI: Boolean
Inhertied from
SuiteTransforms
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.
Inhertied from
Assertions
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(loc: Location, ev: A =:= B): Unit
Inhertied from
Assertions

Inherited fields

val munitLines: Lines
Inhertied from
Assertions
final val munitTestsBuffer: ListBuffer[Test]
Inhertied from
FunSuite

Implicits

Implicits

implicit def arbBitVector: Arbitrary[BitVector]

Inherited implicits

implicit def unitToProp: Unit => Prop
Inhertied from
ScalaCheckSuite
implicit def testOptionsFromString(name: String)(loc: Location): TestOptions
Implicitly create a TestOptions given a test name.
This allows writing test("name") { ... } even if test accepts a TestOptions
Inhertied from
TestOptionsConversions