Introduce NotImplementedError instead of UnsupportedOperationException to throw from TODO function.

#KT-8153
This commit is contained in:
Ilya Gorbunov
2015-07-17 16:32:36 +03:00
parent b7829d8471
commit f57c207ed2
2 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -27,12 +27,12 @@ private class PartiallyImplementedClass {
class TODOTest {
private fun assertNotImplemented(block: () -> Unit) {
assertTrue(fails(block) is UnsupportedOperationException)
assertTrue(fails(block) is NotImplementedError)
}
private fun assertNotImplementedWithMessage(message: String, block: () -> Unit) {
val e = fails(block)
assertTrue(e is UnsupportedOperationException)
assertTrue(e is NotImplementedError)
assertTrue(message in e!!.getMessage()!!)
}