made it easier to pass fails blocks
This commit is contained in:
@@ -65,7 +65,7 @@ inline fun <T> expect(expected: T, message: String, block: ()-> T) {
|
||||
}
|
||||
|
||||
/** Asserts that given function block fails by throwing an exception */
|
||||
fun fails(block: ()-> Any): Exception? {
|
||||
fun fails(block: ()-> Unit): Exception? {
|
||||
try {
|
||||
block()
|
||||
Assert.fail("Expected an exception to be thrown")
|
||||
|
||||
Reference in New Issue
Block a user