Support -Werror CLI argument to treat warnings as errors

The option is named "warningsAsErrors" in the Gradle plugin

 #KT-10563 Fixed
This commit is contained in:
Alexander Udalov
2017-08-25 17:11:34 +03:00
committed by Ilya Gorbunov
parent 897261a8a6
commit 5cbcbe4a9c
26 changed files with 133 additions and 9 deletions
@@ -476,6 +476,30 @@ public class CliTestGenerated extends AbstractCliTest {
doJvmTest(fileName);
}
@TestMetadata("werror.args")
public void testWerror() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werror.args");
doJvmTest(fileName);
}
@TestMetadata("werrorWithExplicitError.args")
public void testWerrorWithExplicitError() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithExplicitError.args");
doJvmTest(fileName);
}
@TestMetadata("werrorWithNoWarn.args")
public void testWerrorWithNoWarn() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithNoWarn.args");
doJvmTest(fileName);
}
@TestMetadata("werrorWithStrongWarning.args")
public void testWerrorWithStrongWarning() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/werrorWithStrongWarning.args");
doJvmTest(fileName);
}
@TestMetadata("wrongAbiVersion.args")
public void testWrongAbiVersion() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/cli/jvm/wrongAbiVersion.args");