From e495bfc5704e26a499651084637c30a1d118239e Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Thu, 14 Feb 2019 14:53:09 +0300 Subject: [PATCH] Stop failing when there's no CIDR classes during running tests --- idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt | 2 ++ idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as32 | 2 ++ idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as33 | 4 +++- idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as34 | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt index 297d5805e62..d4693c07591 100644 --- a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt +++ b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt @@ -5,5 +5,7 @@ package org.jetbrains.kotlin.idea +// Remove the function, when there's no dependency to cidr during running Kotlin tests. +// BUNCH: as33 fun registerAdditionalResourceBundleInTests() { } \ No newline at end of file diff --git a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as32 b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as32 index d48f9598c24..ce452fb7f93 100644 --- a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as32 +++ b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as32 @@ -14,6 +14,8 @@ import java.lang.IllegalStateException private const val CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME = "com.jetbrains.cidr.lang.OCFeatureStatisticsBundleProvider" +// Remove the function, when there's no dependency to cidr during running Kotlin tests. +// BUNCH: as33 fun registerAdditionalResourceBundleInTests() { if (!ApplicationManager.getApplication().isUnitTestMode) { return diff --git a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as33 b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as33 index d48f9598c24..ffc87550944 100644 --- a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as33 +++ b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as33 @@ -14,6 +14,8 @@ import java.lang.IllegalStateException private const val CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME = "com.jetbrains.cidr.lang.OCFeatureStatisticsBundleProvider" +// Remove the function, when there's no dependency to cidr during running Kotlin tests. +// BUNCH: as33 fun registerAdditionalResourceBundleInTests() { if (!ApplicationManager.getApplication().isUnitTestMode) { return @@ -29,7 +31,7 @@ fun registerAdditionalResourceBundleInTests() { val cidrFSBundleProviderClass = try { Class.forName(CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME) } catch (_: ClassNotFoundException) { - throw IllegalStateException("Remove this registration for the current platform: class wasn't found.") + return } val cidrFSBundleProvider = cidrFSBundleProviderClass.newInstance() as FeatureStatisticsBundleProvider diff --git a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as34 b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as34 index d48f9598c24..ffc87550944 100644 --- a/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as34 +++ b/idea/src/org/jetbrains/kotlin/idea/testResourceBundle.kt.as34 @@ -14,6 +14,8 @@ import java.lang.IllegalStateException private const val CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME = "com.jetbrains.cidr.lang.OCFeatureStatisticsBundleProvider" +// Remove the function, when there's no dependency to cidr during running Kotlin tests. +// BUNCH: as33 fun registerAdditionalResourceBundleInTests() { if (!ApplicationManager.getApplication().isUnitTestMode) { return @@ -29,7 +31,7 @@ fun registerAdditionalResourceBundleInTests() { val cidrFSBundleProviderClass = try { Class.forName(CIDR_FEATURE_STATISTICS_PROVIDER_FQNAME) } catch (_: ClassNotFoundException) { - throw IllegalStateException("Remove this registration for the current platform: class wasn't found.") + return } val cidrFSBundleProvider = cidrFSBundleProviderClass.newInstance() as FeatureStatisticsBundleProvider