From dfa067b6ac1f9ad15902fd82d956cf3b53cba18a Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Fri, 31 Jan 2020 10:45:29 +0100 Subject: Fix Gradle integration tests compilation --- .../kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt | 8 ++++---- .../src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'integration-tests/gradle-integration-tests/src/test/kotlin') diff --git a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt index 4814e707..b2ec1bfb 100644 --- a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt +++ b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaGradleTest.kt @@ -1,8 +1,8 @@ package org.jetbrains.dokka.gradle -import com.intellij.rt.execution.junit.FileComparisonFailure import org.gradle.testkit.runner.GradleRunner +import org.junit.ComparisonFailure import org.junit.Rule import org.junit.rules.TemporaryFolder import java.io.File @@ -42,7 +42,7 @@ abstract class AbstractDokkaGradleTest { val noErrorClasses = text.replace(errorClassMarker, "?!") if (noErrorClasses != text) { - throw FileComparisonFailure("", noErrorClasses, text, null) + throw ComparisonFailure("", noErrorClasses, text) } checked++ @@ -59,7 +59,7 @@ abstract class AbstractDokkaGradleTest { val noErrorClasses = text.replace(marker, "?!") if (noErrorClasses != text) { - throw FileComparisonFailure("", noErrorClasses, text, null) + throw ComparisonFailure("", noErrorClasses, text) } checked++ @@ -86,7 +86,7 @@ abstract class AbstractDokkaGradleTest { val expected = textWithoutNonMatches.replace(notMatch, fullLink).replace(match, fullLink) val actual = textWithoutMatches.replace(match, fullLink) - throw FileComparisonFailure("", expected, actual, null) + throw ComparisonFailure("", expected, actual) } if (text != textWithoutMatches) totalEntries++ diff --git a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt index 6f17af22..c7ced70b 100644 --- a/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt +++ b/integration-tests/gradle-integration-tests/src/test/kotlin/org/jetbrains/dokka/gradle/Utils.kt @@ -1,6 +1,6 @@ package org.jetbrains.dokka.gradle -import com.intellij.rt.execution.junit.FileComparisonFailure +import org.junit.ComparisonFailure import java.io.File import java.io.IOException import java.nio.file.* @@ -26,7 +26,7 @@ fun assertEqualsIgnoringSeparators(expectedFile: File, output: String) { val actualText = output.replace("\r\n", "\n") if (expectedText != actualText) - throw FileComparisonFailure("", expectedText, actualText, expectedFile.canonicalPath) + throw ComparisonFailure("Output differs! Expected file path: ${expectedFile.canonicalPath}", expectedText, actualText) } class CopyFileVisitor(private var sourcePath: Path?, private val targetPath: Path) : SimpleFileVisitor() { -- cgit