Report error when try to use unsupported reflection API in Kotlin JS; allow to use kotlin.Any members on reflection classes for both platforms.

This commit is contained in:
Zalim Bashorov
2016-10-07 15:53:10 +03:00
parent 11b2c5fe59
commit c21e1eb857
10 changed files with 217 additions and 33 deletions
@@ -730,4 +730,19 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
}
}
}
@TestMetadata("compiler/testData/diagnostics/testsWithJsStdLib/reflection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Reflection extends AbstractDiagnosticsTestWithJsStdLib {
public void testAllFilesPresentInReflection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/testsWithJsStdLib/reflection"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("reflectionApi.kt")
public void testReflectionApi() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/reflection/reflectionApi.kt");
doTest(fileName);
}
}
}