Packages

c

hedgehog.munit

HedgehogSuite

abstract class HedgehogSuite extends FunSuite with HedgehogAssertions

Linear Supertypes
HedgehogAssertions, FunSuite, ValueTransforms, SuiteTransforms, TestTransforms, TestOptionsConversions, FunFixtures, Assertions, CompileErrorMacro, Suite, PlatformSuite, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HedgehogSuite
  2. HedgehogAssertions
  3. FunSuite
  4. ValueTransforms
  5. SuiteTransforms
  6. TestTransforms
  7. TestOptionsConversions
  8. FunFixtures
  9. Assertions
  10. CompileErrorMacro
  11. Suite
  12. PlatformSuite
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new HedgehogSuite()

Type Members

  1. final type AfterEach = GenericAfterEach[TestValue]
    Definition Classes
    Suite
  2. final type BeforeEach = GenericBeforeEach[TestValue]
    Definition Classes
    Suite
  3. type Failure = core.Result.Failure

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.Failure

  4. abstract class Fixture[T] extends AnyRef
    Definition Classes
    Suite
  5. class FunFixture[T] extends AnyRef
    Definition Classes
    FunFixtures
  6. type Success = core.Result.Success.type

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.Success

  7. final class SuiteTransform extends (List[munit.FunSuite.Test]) => List[munit.FunSuite.Test]
    Definition Classes
    SuiteTransforms
  8. final type Test = GenericTest[TestValue]
    Definition Classes
    Suite
  9. final class TestTransform extends (munit.FunSuite.Test) => munit.FunSuite.Test
    Definition Classes
    TestTransforms
  10. final type TestValue = Future[Any]
    Definition Classes
    FunSuite → Suite
  11. final class ValueTransform extends (Any) => Option[Future[Any]]
    Definition Classes
    ValueTransforms

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def Failure(log: List[Log]): core.Result.Failure

    Alias for Result.Failure

    Alias for Result.Failure

    Definition Classes
    HedgehogAssertions
    See also

    See hedgehog.core.Result.Failure

  5. lazy val Success: Success

    Alias for Result.Success

    Alias for Result.Success

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.Success

  6. def afterAll(): Unit
    Definition Classes
    Suite
  7. def afterEach(context: AfterEach): Unit
    Definition Classes
    Suite
  8. def all(l: List[Result]): core.Result

    Alias for Result.all

    Alias for Result.all

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.all

  9. def any(l: List[Result]): core.Result

    Alias for Result.any

    Alias for Result.any

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.any

  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def assert(cond: => Boolean): Result

    Fails the test with a failure Result when cond is false.

    Fails the test with a failure Result when cond is false.

    returns

    Success iff cond is true. Failure otherwise.

    Definition Classes
    HedgehogAssertions
  12. def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit
    Definition Classes
    Assertions
  13. def assertEquals[A, B](obtained: A, expected: B)(implicit ev: <:<[B, A]): Result

    Fails the test if obtained and expected are non-equal using ==.

    Fails the test if obtained and expected are non-equal using ==.

    obtained

    The actual value

    expected

    The expected value

    returns

    Success iff obtained == expected. Failure otherwise.

    Definition Classes
    HedgehogAssertions
  14. def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, ev: <:<[B, A]): Unit
    Definition Classes
    Assertions
  15. def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit loc: Location): Unit
    Definition Classes
    Assertions
  16. def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit loc: Location): Unit
    Definition Classes
    Assertions
  17. def assertNoDiff(obtained: String, expected: String): Result

    Asserts two strings are equal.

    Asserts two strings are equal.

    obtained

    The actual string

    expected

    The expected value

    returns

    Success iff actual is obtained. Failure otherwise.

    Definition Classes
    HedgehogAssertions
  18. def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location): Unit
    Definition Classes
    Assertions
  19. def assertNotEquals[A, B](obtained: A, expected: B)(implicit ev: =:=[A, B]): Result

    Asserts two values are nonequal.

    Asserts two values are nonequal.

    obtained

    The actual value

    expected

    The expected value

    ev

    Ensures that obtained and expected are of the same type.

    returns

    Success iff obtained != actua.

    Definition Classes
    HedgehogAssertions
  20. def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, ev: =:=[A, B]): Unit
    Definition Classes
    Assertions
  21. def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit
    Definition Classes
    Assertions
  22. def beforeAll(): Unit
    Definition Classes
    Suite
  23. def beforeEach(context: BeforeEach): Unit
    Definition Classes
    Suite
  24. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  25. def clue[T](c: Clue[T]): T
    Definition Classes
    Assertions
  26. def clues(clue: Clue[_]*): Clues
    Definition Classes
    Assertions
  27. macro def compileErrors(code: String): String
    Definition Classes
    CompileErrorMacro
  28. def diff[A, B](a: A, b: B)(f: (A, B) => Boolean): core.Result

    Alias for Result.diff

    Alias for Result.diff

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.diff

  29. def diffDouble(obtained: Double, expected: Double, delta: Double = 0.00): Result

    Asserts two doubles are equal +- some erorr value.

    Asserts two doubles are equal +- some erorr value.

    obtained

    The actual value.

    expected

    The expected value.

    delta

    The error allowed for double == comparison. Default is 0.00.

    returns

    Success iff obtained approximately equals expected +- delta. Failure otherwis

    Definition Classes
    HedgehogAssertions
  30. def diffFloat(obtained: Float, expected: Float, delta: Float = 0.0f): Result

    Float specialized version of HedgehogAssertions.assertEquals.

    Float specialized version of HedgehogAssertions.assertEquals.

    Asserts two floats are equal within +- some error value.

    obtained

    The actual value

    expected

    The expected value

    delta

    The error allowed for float == comparison. Default is 0.0f

    returns

    Success iff obtained approximately equals expected +- delta. Failure otherwise.

    Definition Classes
    HedgehogAssertions
  31. def diffNamed[A, B](logName: String, a: A, b: B)(f: (A, B) => Boolean): core.Result

    Alias for Result.diffNamed

    Alias for Result.diffNamed

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.diffNamed

  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  34. def error(e: Exception): core.Result

    Alias for Result.error

    Alias for Result.error

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.error

  35. def fail(message: String): Result

    Fails a test with the given message

    Fails a test with the given message

    returns

    Failure, always.

    Definition Classes
    HedgehogAssertions
  36. def fail(message: String, cause: Throwable): Result

    Fails a test.

    Fails a test.

    Analagous to munit.Assertions.fail.

    message

    The message to include in the failure.

    cause

    An optional underlying exception to use as the cause of the failure.

    returns

    Failure, always.

    Definition Classes
    HedgehogAssertions
  37. def fail(message: String, clues: Clues)(implicit loc: Location): Nothing
    Definition Classes
    Assertions
  38. def fail(message: String, cause: Throwable)(implicit loc: Location): Nothing
    Definition Classes
    Assertions
  39. def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing
    Definition Classes
    Assertions
  40. def failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing
    Definition Classes
    Assertions
  41. def failure: core.Result

    Alias for Result.failure

    Alias for Result.failure

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.failure

  42. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  44. def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T
    Definition Classes
    Assertions
  45. def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T
    Definition Classes
    Assertions
  46. def isCI: Boolean
    Definition Classes
    SuiteTransforms
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. def munitAnsiColors: Boolean
    Definition Classes
    Assertions
  49. def munitCaptureClues[T](thunk: => T): (T, Clues)
    Definition Classes
    Assertions
  50. def munitExecutionContext: ExecutionContext
    Definition Classes
    Suite
  51. final def munitFailTransform: TestTransform
    Definition Classes
    TestTransforms
  52. def munitFixtures: Seq[Fixture[_]]
    Definition Classes
    Suite
  53. def munitFlakyOK: Boolean
    Definition Classes
    TestTransforms
  54. final def munitFlakyTransform: TestTransform
    Definition Classes
    TestTransforms
  55. final def munitFutureTransform: ValueTransform
    Definition Classes
    ValueTransforms
  56. def munitIgnore: Boolean
    Definition Classes
    SuiteTransforms
  57. final def munitIgnoreSuiteTransform: SuiteTransform
    Definition Classes
    SuiteTransforms
  58. val munitLines: Lines
    Definition Classes
    Assertions
  59. final def munitOnlySuiteTransform: SuiteTransform
    Definition Classes
    SuiteTransforms
  60. def munitPrint(clue: => Any): String
    Definition Classes
    Assertions
  61. final def munitSuiteTransform(tests: List[Test]): List[Test]
    Definition Classes
    SuiteTransforms
  62. def munitSuiteTransforms: List[SuiteTransform]
    Definition Classes
    SuiteTransforms
  63. final def munitTestTransform(test: Test): Test
    Definition Classes
    TestTransforms
  64. def munitTestTransforms: List[TestTransform]
    Definition Classes
    TestTransforms
  65. def munitTests(): Seq[Test]
    Definition Classes
    FunSuite → Suite
  66. final val munitTestsBuffer: ListBuffer[Test]
    Definition Classes
    FunSuite
  67. def munitTimeout: Duration
    Definition Classes
    FunSuite
  68. final def munitValueTransform(testValue: => Any): Future[Any]
    Definition Classes
    ValueTransforms
  69. def munitValueTransforms: List[ValueTransform]
    Definition Classes
    ValueTransforms
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  72. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  73. def property(name: String, withConfig: (PropertyConfig) => PropertyConfig = identity)(prop: => Property)(implicit loc: Location): Unit

    Runs a hedgehog property-based test.

    Runs a hedgehog property-based test.

    withConfig

    A function with which to change the test PropertyConfig

    prop

    The property under test

    loc

    The location in the test suite source file

    See also

    hedgehog.runner.property

  74. def success: core.Result

    Alias for Result.success

    Alias for Result.success

    Definition Classes
    HedgehogAssertions
    See also

    hedgehog.core.Result.success

  75. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  76. def test(options: TestOptions)(body: => Any)(implicit loc: Location): Unit
    Definition Classes
    FunSuite
  77. def test(name: String)(body: => Any)(implicit loc: Location): Unit
    Definition Classes
    FunSuite
  78. implicit def testOptionsFromString(name: String)(implicit loc: Location): TestOptions
    Definition Classes
    TestOptionsConversions
  79. def toString(): String
    Definition Classes
    AnyRef → Any
  80. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  81. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  82. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  83. def withMunitAssertions(body: => (Assertions) => Any): Any

    Turns off hedgehog munit-like assertions, so users can use both property- and non-property- based-tests in their test suites.

    Turns off hedgehog munit-like assertions, so users can use both property- and non-property- based-tests in their test suites. By using the passed assertions parameter, all the standard munit assertions that do not return unit are available, despite name ambiguities.

    Usage

    test("1 + 1 is 2"){
      withMunitAssertions{ assertions =>
        assertEquals(1 + 1, 2)
      }
    }
    body

    a test body, taking an assertions parameter

    Definition Classes
    HedgehogAssertions

Deprecated Value Members

  1. def assert(cond: => Boolean, clue: => Any): Result

    Fails the test with a failure Result when cond is false.

    Fails the test with a failure Result when cond is false.

    Analagous to munit.Assertions.assert.

    Only the condition is used. Clues are ignored.

    clue

    ignored -- usage triggers the deprecation warning

    returns

    Success iff cond is true. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diff, which will automatically output clues

  2. def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit ev: <:<[B, A]): Result

    Fails the test if obtained and expected are non-equal using ==.

    Fails the test if obtained and expected are non-equal using ==.

    Analagous to munit.Assertions.assert.

    Only the obtained and expected values are used.

    obtained

    The actual value

    clue

    Ignored -- Triggers deprecation warning

    ev

    Evidence that A and B are of the same type for the comparison to be valid.

    returns

    Success iff obtained == expected. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.assertEquals, which will automatically output clues

  3. def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any): Result

    Double specialized version of HedgehogAssertions.assertEquals.

    Double specialized version of HedgehogAssertions.assertEquals.

    Asserts two double values are equal +- some error value.

    Analagous to munit.Assertions.assertEqualsDouble.

    Only the obtained, expected and delta parameters are used.

    obtained

    The actual value.

    expected

    The expected value.

    delta

    The error allowed for double == comparison.

    clue

    Ignored -- usage triggers a deprecation warning

    returns

    Success iff obtained approximately equals expected +- delta. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diffDouble, which will automatically output clues

  4. def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any): Result

    Float specialized version of assertEquals.

    Float specialized version of assertEquals.

    Asserts two floats are equal within +- some error value.

    Analagous to munit.Assertions.assertEqualsFloat.

    obtained

    The actual value

    expected

    The expected value

    delta

    The error allowed for float == comparison.

    clue

    Ignored -- usage triggers deprecation warning

    returns

    Success iff obtained approximately equals expected +- delta. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diffFloat, which will automatically output clues

  5. def assertNoDiff(obtained: String, expected: String, clue: => Any): Result

    Asserts two strings are equal without outputting a diff.

    Asserts two strings are equal without outputting a diff.

    Analagous to munit.Assertions.assertNoDiff.

    obtained

    The actual string

    expected

    The expected string

    clue

    Ignored -- usage triggers a deprecation warning

    returns

    Success iff actual is obtained. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diff, which will automatically output clues

  6. def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit ev: =:=[A, B]): Result

    Asserts obtained is not equal to expected using ==.

    Asserts obtained is not equal to expected using ==.

    Analagous to munit.Assertions.notEquals.

    obtained

    The actual value

    expected

    The expected value

    clue

    Ignored -- Usage triggers a deprecation warning

    ev

    Evidence that obtained and expected are of the same type.

    returns

    Success iff obtained != expected. Failure otherwise.

    Definition Classes
    HedgehogAssertions
    Annotations
    @deprecated
    Deprecated

    (Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.assertNotEquals, which will automatically output clues

  7. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from HedgehogAssertions

Inherited from FunSuite

Inherited from ValueTransforms

Inherited from SuiteTransforms

Inherited from TestTransforms

Inherited from TestOptionsConversions

Inherited from FunFixtures

Inherited from Assertions

Inherited from CompileErrorMacro

Inherited from Suite

Inherited from PlatformSuite

Inherited from AnyRef

Inherited from Any

Ungrouped