CodecSuite

abstract class CodecSuite extends ScalaCheckSuite
trait ScalaCheckSuite
class FunSuite
trait BaseFunSuite
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

class FunFixture[T]
Inherited from:
FunFixtures
Source:
FunFixtures.scala
object FunFixture
Inherited from:
FunFixtures
Source:
FunFixtures.scala
final class SuiteTransform(val name: String, fn: List[Test] => List[Test]) extends List[Test] => List[Test]
final class TestTransform(val name: String, fn: Test => Test) extends Test => Test
final class ValueTransform(val name: String, fn: PartialFunction[Any, Future[Any]]) extends Any => Option[Future[Any]]

Inherited types

final type AfterEach = AfterEach
Inherited from:
Suite
Source:
Suite.scala
final type BeforeEach = BeforeEach
Inherited from:
Suite
Source:
Suite.scala
final type Fixture[T] = Fixture[T]
Inherited from:
Suite
Source:
Suite.scala
final type Test = Test
Inherited from:
Suite
Source:
Suite.scala
final type TestValue = Future[Any]

The value produced by test bodies.

The value produced by test bodies.

Inherited from:
Suite
Source:
Suite.scala

Value members

Concrete methods

protected def assertBitsEqual(actual: BitVector, expected: BitVector)(using Location): Unit
protected def definedSamples[A](gen: Gen[A]): LazyList[A]
protected def encodeError[A](codec: Codec[A], a: A, err: Err)(using Location): Unit
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 samples[A](gen: Gen[A]): LazyList[Option[A]]
Definition Classes
ScalaCheckSuite
Source:
CodecSuite.scala
protected def shouldDecodeFullyTo[A](codec: Codec[A], buf: BitVector, expected: A)(using Location): Unit
protected def time[A](f: => A): (A, FiniteDuration)

Inherited methods

def afterAll(): Unit

Runs once after all test cases and after all suite-local fixtures have been tear down.

Runs once after all test cases and after all suite-local fixtures have been tear down.

Inherited from:
Suite
Source:
Suite.scala
def afterEach(context: AfterEach): Unit

Runs after each individual test case.

Runs after each individual test case.

Inherited from:
Suite
Source:
Suite.scala
def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
Source:
Assertions.scala
def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are equal according to the Compare[A, B] type-class.

Asserts that two elements are equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Inherited from:
Assertions
Source:
Assertions.scala
def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit 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.

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.

Inherited from:
Assertions
Source:
Assertions.scala
def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit 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.

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.

Inherited from:
Assertions
Source:
Assertions.scala
def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
Source:
Assertions.scala
def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, compare: Compare[A, B]): Unit

Asserts that two elements are not equal according to the Compare[A, B] type-class.

Asserts that two elements are not equal according to the Compare[A, B] type-class.

By default, uses == to compare values.

Inherited from:
Assertions
Source:
Assertions.scala
def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit
Inherited from:
Assertions
Source:
Assertions.scala

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Runs once before all test cases and before all suite-local fixtures are setup. An error in this method aborts the test suite.

Inherited from:
Suite
Source:
Suite.scala
def beforeEach(context: BeforeEach): Unit

Runs before each individual test case. An error in this method aborts the test case.

Runs before each individual test case. An error in this method aborts the test case.

Inherited from:
Suite
Source:
Suite.scala
def clue[T](c: Clue[T]): T
Inherited from:
Assertions
Source:
Assertions.scala
def clues(clue: Clue[_]*): Clues
Inherited from:
Assertions
Source:
Assertions.scala
inline def compileErrors(inline code: String): String
Inherited from:
CompileErrorMacro
Source:
MacroCompat.scala
def fail(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and optional clues.

Unconditionally fails this test with the given message and optional clues.

Inherited from:
Assertions
Source:
Assertions.scala
def fail(message: String, cause: Throwable)(implicit loc: Location): Nothing

Unconditionally fails this test with the given message and exception marked as the cause.

Unconditionally fails this test with the given message and exception marked as the cause.

Inherited from:
Assertions
Source:
Assertions.scala
def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fails this test due to result of comparing two values.

Unconditionally fails this test due to result of comparing two values.

The only reason to use this method instead of fail() is if you want to allow comparing the two different values in the the IntelliJ GUI diff viewer.

Inherited from:
Assertions
Source:
Assertions.scala
def failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Unconditionally fail this test case and cancel all the subsequent tests in this suite.

Inherited from:
Assertions
Source:
Assertions.scala
def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T is thrown.

Evalutes the given expression and asserts that an exception of type T is thrown.

Inherited from:
Assertions
Source:
Assertions.scala
def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Evalutes the given expression and asserts that an exception of type T with the expected message is thrown.

Inherited from:
Assertions
Source:
Assertions.scala
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
Inherited from:
Assertions
Source:
Assertions.scala
def munitCaptureClues[T](thunk: => T): (T, Clues)
Inherited from:
Assertions
Source:
Assertions.scala
Inherited from:
Suite
Source:
Suite.scala
Inherited from:
TestTransforms
Source:
TestTransforms.scala
def munitFixtures: Seq[AnyFixture[_]]

Fixtures that can be reused for individual test cases or entire suites.

Fixtures that can be reused for individual test cases or entire suites.

Inherited from:
Suite
Source:
Suite.scala
Inherited from:
TestTransforms
Source:
TestTransforms.scala
Inherited from:
TestTransforms
Source:
TestTransforms.scala
Inherited from:
ValueTransforms
Source:
ValueTransforms.scala
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
def munitPrint(clue: => Any): String
Inherited from:
Assertions
Source:
Assertions.scala
final def munitSuiteTransform(tests: List[Test]): List[Test]
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
Inherited from:
SuiteTransforms
Source:
SuiteTransforms.scala
final def munitTestTransform(test: Test): Test
Inherited from:
TestTransforms
Source:
TestTransforms.scala
Definition Classes
ScalaCheckSuite -> TestTransforms
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala
def munitTests(): Seq[Test]
Inherited from:
BaseFunSuite
Source:
FunSuite.scala
Inherited from:
BaseFunSuite
Source:
FunSuite.scala
final def munitValueTransform(testValue: => Any): Future[Any]
Inherited from:
ValueTransforms
Source:
ValueTransforms.scala
Inherited from:
ValueTransforms
Source:
ValueTransforms.scala
def property(options: TestOptions)(body: => Prop)(implicit loc: Location): Unit
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala
def property(name: String)(body: => Prop)(implicit loc: Location): Unit
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala
def test(options: TestOptions)(body: => Any)(implicit loc: Location): Unit
Inherited from:
BaseFunSuite
Source:
FunSuite.scala
def test(name: String)(body: => Any)(implicit loc: Location): Unit
Inherited from:
BaseFunSuite
Source:
FunSuite.scala

Inherited fields

val munitLines: Lines
Inherited from:
Assertions
Source:
Assertions.scala
final val munitTestsBuffer: ListBuffer[Test]
Inherited from:
BaseFunSuite
Source:
FunSuite.scala

Implicits

Inherited implicits

implicit def testOptionsFromString(name: String)(implicit loc: Location): TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Implicitly create a TestOptions given a test name. This allows writing test("name") { ... } even if test accepts a TestOptions

Inherited from:
TestOptionsConversions
Source:
TestOptions.scala
implicit def unitToProp(unit: Unit): Prop
Inherited from:
ScalaCheckSuite
Source:
ScalaCheckSuite.scala