made it easier to pass fails blocks

This commit is contained in:
James Strachan
2012-02-29 09:19:23 +00:00
parent 54a38127e1
commit f1466449a8
+1 -1
View File
@@ -77,7 +77,7 @@ fun fails(block: ()-> Unit): Exception? {
}
/** Asserts that a block fails with a specific exception being thrown */
fun <T: Exception> failsWith(block: ()-> Any) {
fun <T: Exception> failsWith(block: ()-> Unit) {
try {
block()
Assert.fail("Expected an exception to be thrown")