We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8d7fed8 commit c6c7eb5Copy full SHA for c6c7eb5
1 file changed
app/src/androidTest/kotlin/org/fossify/calendar/testing/ExpectedFailureUtils.kt
@@ -0,0 +1,13 @@
1
+package org.fossify.calendar.testing
2
+
3
+fun expectedFailure(testName: String = "", block: () -> Unit) {
4
+ try {
5
+ block()
6
+ println("WARNING: Expected failure test '$testName' passed unexpectedly.")
7
+ } catch (e: Throwable) {
8
+ println("Expected failure in test '$testName': ${e.javaClass.simpleName}: ${e.message}")
9
+ return
10
+ }
11
12
+ throw AssertionError("Expected failure test '$testName' passed unexpectedly. Investigate: bug may be fixed.")
13
+}
0 commit comments