From f1466449a8912fdcce2da3beb3cb074dd49ce31c Mon Sep 17 00:00:00 2001 From: James Strachan Date: Wed, 29 Feb 2012 09:19:23 +0000 Subject: [PATCH] made it easier to pass fails blocks --- kunit/src/main/kotlin/Test.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kunit/src/main/kotlin/Test.kt b/kunit/src/main/kotlin/Test.kt index e094a0066fc..3789573874e 100644 --- a/kunit/src/main/kotlin/Test.kt +++ b/kunit/src/main/kotlin/Test.kt @@ -77,7 +77,7 @@ fun fails(block: ()-> Unit): Exception? { } /** Asserts that a block fails with a specific exception being thrown */ -fun failsWith(block: ()-> Any) { +fun failsWith(block: ()-> Unit) { try { block() Assert.fail("Expected an exception to be thrown")