Don't use deprecated+deleted Google Truth `fail` method Summary: The `fail` method we previously used was deprecated and removed. Reviewed By: strulovich Differential Revision: D19195985 fbshipit-source-id: 026ea1ea860691dcf25633981a6a4d527005dd1c
diff --git a/core/src/test/java/com/facebook/ktfmt/FormatterKtTest.kt b/core/src/test/java/com/facebook/ktfmt/FormatterKtTest.kt index d685878..cf2c3f5 100644 --- a/core/src/test/java/com/facebook/ktfmt/FormatterKtTest.kt +++ b/core/src/test/java/com/facebook/ktfmt/FormatterKtTest.kt
@@ -1607,7 +1607,7 @@ fun isEqualTo(expectedFormatting: String) { val code = actual() if (expectedFormatting.lines().any { it.endsWith(" ") }) { - fail( + throw RuntimeException( "Expected code contains trailing whitespace, which the formatter will never output:\n" + expectedFormatting.lines().map { if (it.endsWith(" ")) "[$it]" else it }.joinToString("\n")) }