Alias for Result.Failure
Alias for Result.Failure
See hedgehog.core.Result.Failure
Alias for Result.Success
Alias for Result.Success
hedgehog.core.Result.Success
Alias for Result.all
Alias for Result.all
hedgehog.core.Result.all
Alias for Result.any
Alias for Result.any
hedgehog.core.Result.any
Fails the test with a failure Result when cond
is false
.
Fails the test with a failure Result when cond
is false
.
Success iff cond is true. Failure otherwise.
Fails the test if obtained
and expected
are non-equal using ==
.
Fails the test if obtained
and expected
are non-equal using ==
.
The actual value
The expected value
Success iff obtained == expected. Failure otherwise.
Asserts two strings are equal.
Asserts two strings are equal.
The actual string
The expected value
Success iff actual is obtained. Failure otherwise.
Asserts two values are nonequal.
Asserts two values are nonequal.
The actual value
The expected value
Ensures that obtained and expected are of the same type.
Success iff obtained != actua.
Alias for Result.diff
Alias for Result.diff
hedgehog.core.Result.diff
Asserts two doubles are equal +- some erorr value.
Asserts two doubles are equal +- some erorr value.
The actual value.
The expected value.
The error allowed for double == comparison. Default is 0.00.
Success iff obtained approximately equals expected +- delta. Failure otherwis
Float specialized version of HedgehogAssertions.assertEquals.
Float specialized version of HedgehogAssertions.assertEquals.
Asserts two floats are equal within +- some error value.
The actual value
The expected value
The error allowed for float == comparison. Default is 0.0f
Success iff obtained approximately equals expected +- delta. Failure otherwise.
Alias for Result.diffNamed
Alias for Result.diffNamed
hedgehog.core.Result.diffNamed
Alias for Result.error
Alias for Result.error
hedgehog.core.Result.error
Fails a test with the given message
Fails a test with the given message
Failure, always.
Fails a test.
Fails a test.
Analagous to munit.Assertions.fail.
The message to include in the failure.
An optional underlying exception to use as the cause of the failure.
Failure, always.
Alias for Result.failure
Alias for Result.failure
hedgehog.core.Result.failure
Alias for Result.success
Alias for Result.success
hedgehog.core.Result.success
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.
test("1 + 1 is 2"){ withMunitAssertions{ assertions => assertEquals(1 + 1, 2) } }
a test body, taking an assertions parameter
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.
ignored -- usage triggers the deprecation warning
Success iff cond is true. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diff, which will automatically output clues
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.
The actual value
Ignored -- Triggers deprecation warning
Evidence that A and B are of the same type for the comparison to be valid.
Success iff obtained == expected. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.assertEquals, which will automatically output clues
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.
The actual value.
The expected value.
The error allowed for double == comparison.
Ignored -- usage triggers a deprecation warning
Success iff obtained approximately equals expected +- delta. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diffDouble, which will automatically output clues
Float specialized version of assertEquals.
Float specialized version of assertEquals.
Asserts two floats are equal within +- some error value.
Analagous to munit.Assertions.assertEqualsFloat.
The actual value
The expected value
The error allowed for float == comparison.
Ignored -- usage triggers deprecation warning
Success iff obtained approximately equals expected +- delta. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diffFloat, which will automatically output clues
Asserts two strings are equal without outputting a diff.
Asserts two strings are equal without outputting a diff.
Analagous to munit.Assertions.assertNoDiff.
The actual string
The expected string
Ignored -- usage triggers a deprecation warning
Success iff actual is obtained. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.diff, which will automatically output clues
Asserts obtained is not equal to expected using ==.
Asserts obtained is not equal to expected using ==.
Analagous to munit.Assertions.notEquals.
The actual value
The expected value
Ignored -- Usage triggers a deprecation warning
Evidence that obtained and expected are of the same type.
Success iff obtained != expected. Failure otherwise.
(Since version ) Clues are unnecessary with hedgehog. Use HedgehogAssertions.assertNotEquals, which will automatically output clues
(Since version ) see corresponding Javadoc for more information.
Mirrors munit.Assertions assertions, allowing munit users to use familiar assertions while returning proper hedgehog.Result objects in property tests.
Signatures don't line up exactly -- munit.Assertions is not F-bound polymorphic, so there is no way to align the signatures of the same argumentns with different return types in scala. We can, however, simply omit the implicit location arguments, because hedgehog.Result doesn't require munit.Location. Except in cases where Location is passed explicitly (which should be rare in user code), this should result in fairly easy adoption by munit and munit-scalacheck users.