made it easier to pass fails blocks

This commit is contained in:
James Strachan
2012-02-29 09:19:10 +00:00
parent 99269eca8e
commit 54a38127e1
+1 -1
View File
@@ -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")