tests: Add fail() function to TestUtils

This commit is contained in:
Ilya Matveev
2017-03-13 18:26:14 +03:00
committed by ilmat192
parent 8e91da7aad
commit d3945bff3b
+5
View File
@@ -15,3 +15,8 @@ fun assertTrue(actual: Boolean, message: String? = null) {
fun assertFalse(actual: Boolean, message: String? = null) {
assertTrue(!actual, message ?: "Expected value to be false.")
}
/** Fails the current test with the specified [message]. */
fun fail(message: String? = null) {
throw TestFailedException(message ?: "Expected value to be true.")
}