report presence of multiple different versions of kotlin-runtime on the classpath as compilation error if other compilation errors have occurred

This commit is contained in:
Dmitry Jemerov
2016-01-19 13:51:35 +01:00
parent 4f5b2ec4b4
commit ccef1ad49e
14 changed files with 117 additions and 22 deletions
@@ -34,6 +34,7 @@ import org.jetbrains.kotlin.serialization.deserialization.BinaryVersion;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.Tmpdir;
import org.jetbrains.kotlin.utils.ExceptionUtilsKt;
import org.jetbrains.kotlin.utils.PathUtil;
import org.junit.Rule;
import org.junit.rules.TestName;
@@ -83,6 +84,7 @@ public class CliBaseTest {
) {
String normalizedOutputWithoutExitCode = pureOutput
.replace(new File(testDataDir).getAbsolutePath(), "$TESTDATA_DIR$")
.replace(PathUtil.getKotlinPathsForDistDirectory().getHomePath().getAbsolutePath(), "$PROJECT_DIR$")
.replace("expected version is " + version, "expected version is $ABI_VERSION$")
.replace("\\", "/")
.replace(KotlinVersion.VERSION, "$VERSION$");
@@ -73,6 +73,18 @@ public class KotlincExecutableTestGenerated extends AbstractKotlincExecutableTes
doJvmTest(fileName);
}
@TestMetadata("conflictingRuntimeVersion.args")
public void testConflictingRuntimeVersion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/conflictingRuntimeVersion.args");
doJvmTest(fileName);
}
@TestMetadata("conflictingRuntimeVersionNoError.args")
public void testConflictingRuntimeVersionNoError() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/conflictingRuntimeVersionNoError.args");
doJvmTest(fileName);
}
@TestMetadata("diagnosticsOrder.args")
public void testDiagnosticsOrder() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/diagnosticsOrder.args");