KT-12877: add diagnostics on JsModule/JsNonModule:
1) for all cases of misusing of JsModule report on JsNonModule as well 2) report about non-top-level declarations with JsModule/JsNonModule 3) report about JsModule/JsNonModule declarations inside file marked with JsModule/JsNonModule 4) report about usages of declarations not marked with both JsModule and JsNonModule from UMD module
This commit is contained in:
committed by
Alexey Andreev
parent
08a7f9c298
commit
31a1d6ca66
+18
@@ -305,12 +305,30 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/module"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("dualModuleFromUmd.kt")
|
||||
public void testDualModuleFromUmd() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/dualModuleFromUmd.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("jsVarProhibited.kt")
|
||||
public void testJsVarProhibited() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/jsVarProhibited.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedProhibited.kt")
|
||||
public void testNestedProhibited() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/nestedProhibited.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nonTopLevelProhibited.kt")
|
||||
public void testNonTopLevelProhibited() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/nonTopLevelProhibited.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("prohibitedOnNonNative.kt")
|
||||
public void testProhibitedOnNonNative() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/module/prohibitedOnNonNative.kt");
|
||||
|
||||
Reference in New Issue
Block a user