[IR] add JsTextTest for IrScript

This commit is contained in:
Vitaliy.Tikhonov
2019-08-30 14:41:54 +03:00
committed by romanart
parent 209a20153e
commit cf5a1615ea
11 changed files with 383 additions and 3 deletions
@@ -169,4 +169,32 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase {
runTest("compiler/testData/ir/irJsText/native/nativeNativeKotlin.kt");
}
}
@TestMetadata("compiler/testData/ir/irJsText/scripting")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Scripting extends AbstractIrJsTextTestCase {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
}
public void testAllFilesPresentInScripting() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/scripting"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("arrayAssignment.kts")
public void testArrayAssignment() throws Exception {
runTest("compiler/testData/ir/irJsText/scripting/arrayAssignment.kts");
}
@TestMetadata("fun.kts")
public void testFun() throws Exception {
runTest("compiler/testData/ir/irJsText/scripting/fun.kts");
}
@TestMetadata("safeCalls.kts")
public void testSafeCalls() throws Exception {
runTest("compiler/testData/ir/irJsText/scripting/safeCalls.kts");
}
}
}