[KT-4124] Add test case for nested/inner classes inside native class. Add diagnostic of inner classes inside native classes.

This commit is contained in:
Alexey Andreev
2016-02-15 17:55:31 +03:00
parent 040a646174
commit f5786dd567
17 changed files with 176 additions and 70 deletions
@@ -490,6 +490,21 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nested")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Nested extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInNested() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/native/nested"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("nativeNestedClassProhibited.kt")
public void testNativeNestedClassProhibited() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/nested/nativeNestedClassProhibited.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/optionlBody")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)