abstract class HedgehogSuite extends FunSuite with HedgehogAssertions
- Alphabetic
- By Inheritance
- HedgehogSuite
- HedgehogAssertions
- FunSuite
- ValueTransforms
- SuiteTransforms
- TestTransforms
- TestOptionsConversions
- FunFixtures
- Assertions
- CompileErrorMacro
- Suite
- PlatformSuite
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new HedgehogSuite()
Type Members
- final type AfterEach = GenericAfterEach[TestValue]
- Definition Classes
- Suite
- final type BeforeEach = GenericBeforeEach[TestValue]
- Definition Classes
- Suite
- type Failure = core.Result.Failure
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.Failure
- abstract class Fixture[T] extends AnyRef
- Definition Classes
- Suite
- class FunFixture[T] extends AnyRef
- Definition Classes
- FunFixtures
- type Success = core.Result.Success.type
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.Success
- final class SuiteTransform extends (List[munit.FunSuite.Test]) => List[munit.FunSuite.Test]
- Definition Classes
- SuiteTransforms
- final type Test = GenericTest[TestValue]
- Definition Classes
- Suite
- final class TestTransform extends (munit.FunSuite.Test) => munit.FunSuite.Test
- Definition Classes
- TestTransforms
- final type TestValue = Future[Any]
- Definition Classes
- FunSuite → Suite
- final class ValueTransform extends (Any) => Option[Future[Any]]
- Definition Classes
- ValueTransforms
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
- 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
- lazy val Success: Success
Alias for Result.Success
Alias for Result.Success
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.Success
- def afterAll(): Unit
- Definition Classes
- Suite
- def afterEach(context: AfterEach): Unit
- Definition Classes
- Suite
- def all(l: List[Result]): core.Result
Alias for Result.all
Alias for Result.all
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.all
- def any(l: List[Result]): core.Result
Alias for Result.any
Alias for Result.any
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def assert(cond: => Boolean): Result
Fails the test with a failure Result when
cond
isfalse
.Fails the test with a failure Result when
cond
isfalse
.- returns
Success iff cond is true. Failure otherwise.
- Definition Classes
- HedgehogAssertions
- def assert(cond: => Boolean, clue: => Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
- def assertEquals[A, B](obtained: A, expected: B)(implicit ev: <:<[B, A]): Result
Fails the test if
obtained
andexpected
are non-equal using==
.Fails the test if
obtained
andexpected
are non-equal using==
.- obtained
The actual value
- expected
The expected value
- returns
Success iff obtained == expected. Failure otherwise.
- Definition Classes
- HedgehogAssertions
- def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, ev: <:<[B, A]): Unit
- Definition Classes
- Assertions
- def assertEqualsDouble(obtained: Double, expected: Double, delta: Double, clue: => Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
- def assertEqualsFloat(obtained: Float, expected: Float, delta: Float, clue: => Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
- 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
- def assertNoDiff(obtained: String, expected: String, clue: => Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
- 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
- def assertNotEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit loc: Location, ev: =:=[A, B]): Unit
- Definition Classes
- Assertions
- def assume(cond: Boolean, clue: => Any)(implicit loc: Location): Unit
- Definition Classes
- Assertions
- def beforeAll(): Unit
- Definition Classes
- Suite
- def beforeEach(context: BeforeEach): Unit
- Definition Classes
- Suite
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def clue[T](c: Clue[T]): T
- Definition Classes
- Assertions
- def clues(clue: Clue[_]*): Clues
- Definition Classes
- Assertions
- macro def compileErrors(code: String): String
- Definition Classes
- CompileErrorMacro
- 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
- 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
- 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
- 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
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def error(e: Exception): core.Result
Alias for Result.error
Alias for Result.error
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.error
- def fail(message: String): Result
Fails a test with the given message
- 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
- def fail(message: String, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
- def fail(message: String, cause: Throwable)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
- def failComparison(message: String, obtained: Any, expected: Any, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
- def failSuite(message: String, clues: Clues)(implicit loc: Location): Nothing
- Definition Classes
- Assertions
- def failure: core.Result
Alias for Result.failure
Alias for Result.failure
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.failure
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def intercept[T <: Throwable](body: => Any)(implicit T: ClassTag[T], loc: Location): T
- Definition Classes
- Assertions
- def interceptMessage[T <: Throwable](expectedExceptionMessage: String)(body: => Any)(implicit T: ClassTag[T], loc: Location): T
- Definition Classes
- Assertions
- def isCI: Boolean
- Definition Classes
- SuiteTransforms
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def munitAnsiColors: Boolean
- Definition Classes
- Assertions
- def munitCaptureClues[T](thunk: => T): (T, Clues)
- Definition Classes
- Assertions
- def munitExecutionContext: ExecutionContext
- Definition Classes
- Suite
- final def munitFailTransform: TestTransform
- Definition Classes
- TestTransforms
- def munitFixtures: Seq[Fixture[_]]
- Definition Classes
- Suite
- def munitFlakyOK: Boolean
- Definition Classes
- TestTransforms
- final def munitFlakyTransform: TestTransform
- Definition Classes
- TestTransforms
- final def munitFutureTransform: ValueTransform
- Definition Classes
- ValueTransforms
- def munitIgnore: Boolean
- Definition Classes
- SuiteTransforms
- final def munitIgnoreSuiteTransform: SuiteTransform
- Definition Classes
- SuiteTransforms
- val munitLines: Lines
- Definition Classes
- Assertions
- final def munitOnlySuiteTransform: SuiteTransform
- Definition Classes
- SuiteTransforms
- def munitPrint(clue: => Any): String
- Definition Classes
- Assertions
- final def munitSuiteTransform(tests: List[Test]): List[Test]
- Definition Classes
- SuiteTransforms
- def munitSuiteTransforms: List[SuiteTransform]
- Definition Classes
- SuiteTransforms
- final def munitTestTransform(test: Test): Test
- Definition Classes
- TestTransforms
- def munitTestTransforms: List[TestTransform]
- Definition Classes
- TestTransforms
- def munitTests(): Seq[Test]
- Definition Classes
- FunSuite → Suite
- final val munitTestsBuffer: ListBuffer[Test]
- Definition Classes
- FunSuite
- def munitTimeout: Duration
- Definition Classes
- FunSuite
- final def munitValueTransform(testValue: => Any): Future[Any]
- Definition Classes
- ValueTransforms
- def munitValueTransforms: List[ValueTransform]
- Definition Classes
- ValueTransforms
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- 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
- def success: core.Result
Alias for Result.success
Alias for Result.success
- Definition Classes
- HedgehogAssertions
- See also
hedgehog.core.Result.success
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test(options: TestOptions)(body: => Any)(implicit loc: Location): Unit
- Definition Classes
- FunSuite
- def test(name: String)(body: => Any)(implicit loc: Location): Unit
- Definition Classes
- FunSuite
- implicit def testOptionsFromString(name: String)(implicit loc: Location): TestOptions
- Definition Classes
- TestOptionsConversions
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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
- def assert(cond: => Boolean, clue: => Any): Result
Fails the test with a failure Result when
cond
isfalse
.Fails the test with a failure Result when
cond
isfalse
.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
- def assertEquals[A, B](obtained: A, expected: B, clue: => Any)(implicit ev: <:<[B, A]): Result
Fails the test if
obtained
andexpected
are non-equal using==
.Fails the test if
obtained
andexpected
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
- 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
- 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
- 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
- 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
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)