[Psi2Ir] Fix IrText test generation

This commit is contained in:
Roman Artemev
2019-10-10 18:10:49 +03:00
committed by romanart
parent 6ddc05a5a8
commit aecd08e562
2 changed files with 20 additions and 5 deletions
@@ -194,7 +194,7 @@ fun main(args: Array<String>) {
} }
testClass<AbstractIrJsTextTestCase> { testClass<AbstractIrJsTextTestCase> {
model("ir/irJsText") model("ir/irJsText", pattern = "^(.+)\\.kt(s)?\$")
} }
testClass<AbstractIrCfgTestCase> { testClass<AbstractIrCfgTestCase> {
@@ -26,7 +26,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase {
} }
public void testAllFilesPresentInIrJsText() throws Exception { public void testAllFilesPresentInIrJsText() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText"), Pattern.compile("^(.+)\\.kt(s)?$"), TargetBackend.ANY, true);
} }
@TestMetadata("compiler/testData/ir/irJsText/dynamic") @TestMetadata("compiler/testData/ir/irJsText/dynamic")
@@ -38,7 +38,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase {
} }
public void testAllFilesPresentInDynamic() throws Exception { public void testAllFilesPresentInDynamic() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/dynamic"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/dynamic"), Pattern.compile("^(.+)\\.kt(s)?$"), TargetBackend.ANY, true);
} }
@TestMetadata("dynamicAndMembersOfAny.kt") @TestMetadata("dynamicAndMembersOfAny.kt")
@@ -161,7 +161,7 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase {
} }
public void testAllFilesPresentInNative() throws Exception { public void testAllFilesPresentInNative() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/native"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/native"), Pattern.compile("^(.+)\\.kt(s)?$"), TargetBackend.ANY, true);
} }
@TestMetadata("nativeNativeKotlin.kt") @TestMetadata("nativeNativeKotlin.kt")
@@ -179,7 +179,22 @@ public class IrJsTextTestCaseGenerated extends AbstractIrJsTextTestCase {
} }
public void testAllFilesPresentInScripting() throws Exception { public void testAllFilesPresentInScripting() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/scripting"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/ir/irJsText/scripting"), Pattern.compile("^(.+)\\.kt(s)?$"), 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");
} }
} }
} }