From d3945bff3bfc32d20d93453a3225cf871545a76d Mon Sep 17 00:00:00 2001 From: Ilya Matveev Date: Mon, 13 Mar 2017 18:26:14 +0300 Subject: [PATCH] tests: Add fail() function to TestUtils --- backend.native/tests/testUtils.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend.native/tests/testUtils.kt b/backend.native/tests/testUtils.kt index 9280f76adf4..0d726251ef6 100644 --- a/backend.native/tests/testUtils.kt +++ b/backend.native/tests/testUtils.kt @@ -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.") +} \ No newline at end of file