JS: support toDelegateFor in JS backend (see KT-15163)
This commit is contained in:
committed by
Stanislav Erokhin
parent
937a933150
commit
a01fac9d10
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
@@ -10,7 +9,7 @@ inline fun <T> runLogged(entry: String, action: () -> T): T {
|
|||||||
return action()
|
return action()
|
||||||
}
|
}
|
||||||
|
|
||||||
operator fun String.toDelegateFor(host: Any?, p: Any): String =
|
operator fun String.toDelegateFor(host: Any?, p: Any): String =
|
||||||
runLogged("tdf($this);") { this }
|
runLogged("tdf($this);") { this }
|
||||||
|
|
||||||
operator fun String.getValue(receiver: Any?, p: Any): String =
|
operator fun String.getValue(receiver: Any?, p: Any): String =
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
|
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
object Host {
|
object Host {
|
||||||
class StringDelegate(val s: String) {
|
class StringDelegate(val s: String) {
|
||||||
|
|||||||
-1
@@ -1,5 +1,4 @@
|
|||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
// IGNORE_BACKEND: JS
|
|
||||||
|
|
||||||
import kotlin.test.*
|
import kotlin.test.*
|
||||||
import kotlin.reflect.KProperty
|
import kotlin.reflect.KProperty
|
||||||
|
|||||||
@@ -1234,7 +1234,7 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
testGroup("js/js.tests/test", "js/js.translator/testData") {
|
testGroup("js/js.tests/test", "js/js.translator/testData") {
|
||||||
testClass<AbstractBoxJsTest>() {
|
testClass<AbstractBoxJsTest>() {
|
||||||
model("box/", pattern = "^([^_](.+))\\.kt$")
|
model("box/", pattern = "^([^_](.+))\\.kt$", targetBackend = TargetBackend.JS)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInBox() throws Exception {
|
public void testAllFilesPresentInBox() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/annotation")
|
@TestMetadata("js/js.translator/testData/box/annotation")
|
||||||
@@ -41,7 +41,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Annotation extends AbstractBoxJsTest {
|
public static class Annotation extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInAnnotation() throws Exception {
|
public void testAllFilesPresentInAnnotation() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/annotation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/annotation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("annotationClass.kt")
|
@TestMetadata("annotationClass.kt")
|
||||||
@@ -56,7 +56,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class CallableReference extends AbstractBoxJsTest {
|
public static class CallableReference extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInCallableReference() throws Exception {
|
public void testAllFilesPresentInCallableReference() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/callableReference/function")
|
@TestMetadata("js/js.translator/testData/box/callableReference/function")
|
||||||
@@ -70,7 +70,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInFunction() throws Exception {
|
public void testAllFilesPresentInFunction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/function"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/function"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classMemberAndExtension.kt")
|
@TestMetadata("classMemberAndExtension.kt")
|
||||||
@@ -295,7 +295,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInProperty() throws Exception {
|
public void testAllFilesPresentInProperty() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/property"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/callableReference/property"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("delegated.kt")
|
@TestMetadata("delegated.kt")
|
||||||
@@ -383,7 +383,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Char extends AbstractBoxJsTest {
|
public static class Char extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInChar() throws Exception {
|
public void testAllFilesPresentInChar() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/char"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/char"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("charBinaryOperations.kt")
|
@TestMetadata("charBinaryOperations.kt")
|
||||||
@@ -446,7 +446,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInClassObject() throws Exception {
|
public void testAllFilesPresentInClassObject() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/classObject"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/classObject"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("defaultObjectSameNamesAsInOuter.kt")
|
@TestMetadata("defaultObjectSameNamesAsInOuter.kt")
|
||||||
@@ -509,7 +509,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Closure extends AbstractBoxJsTest {
|
public static class Closure extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInClosure() throws Exception {
|
public void testAllFilesPresentInClosure() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/closure"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("closureArrayListInstance.kt")
|
@TestMetadata("closureArrayListInstance.kt")
|
||||||
@@ -788,7 +788,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class CrossModuleRef extends AbstractBoxJsTest {
|
public static class CrossModuleRef extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInCrossModuleRef() throws Exception {
|
public void testAllFilesPresentInCrossModuleRef() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/crossModuleRef"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/crossModuleRef"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("callableObjectRef.kt")
|
@TestMetadata("callableObjectRef.kt")
|
||||||
@@ -863,7 +863,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class DataClass extends AbstractBoxJsTest {
|
public static class DataClass extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDataClass() throws Exception {
|
public void testAllFilesPresentInDataClass() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dataClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dataClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("components.kt")
|
@TestMetadata("components.kt")
|
||||||
@@ -920,7 +920,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class DefaultArguments extends AbstractBoxJsTest {
|
public static class DefaultArguments extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDefaultArguments() throws Exception {
|
public void testAllFilesPresentInDefaultArguments() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/defaultArguments"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("complexExpressionAsDefaultArgument.kt")
|
@TestMetadata("complexExpressionAsDefaultArgument.kt")
|
||||||
@@ -1019,7 +1019,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class DelegateProperty extends AbstractBoxJsTest {
|
public static class DelegateProperty extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDelegateProperty() throws Exception {
|
public void testAllFilesPresentInDelegateProperty() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegateProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegateProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("capturedLocalVal.kt")
|
@TestMetadata("capturedLocalVal.kt")
|
||||||
@@ -1142,7 +1142,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Delegation extends AbstractBoxJsTest {
|
public static class Delegation extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDelegation() throws Exception {
|
public void testAllFilesPresentInDelegation() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/delegation"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("complexDelegation.kt")
|
@TestMetadata("complexDelegation.kt")
|
||||||
@@ -1277,7 +1277,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Dynamic extends AbstractBoxJsTest {
|
public static class Dynamic extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDynamic() throws Exception {
|
public void testAllFilesPresentInDynamic() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dynamic"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/dynamic"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("binaryOperations.kt")
|
@TestMetadata("binaryOperations.kt")
|
||||||
@@ -1406,7 +1406,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInEnum() throws Exception {
|
public void testAllFilesPresentInEnum() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/enum"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/enum"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("enumInheritedFromTrait.kt")
|
@TestMetadata("enumInheritedFromTrait.kt")
|
||||||
@@ -1475,7 +1475,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Examples extends AbstractBoxJsTest {
|
public static class Examples extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInExamples() throws Exception {
|
public void testAllFilesPresentInExamples() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/examples"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/examples"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("basicmethod.kt")
|
@TestMetadata("basicmethod.kt")
|
||||||
@@ -1658,7 +1658,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Expression extends AbstractBoxJsTest {
|
public static class Expression extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInExpression() throws Exception {
|
public void testAllFilesPresentInExpression() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/expression/cast")
|
@TestMetadata("js/js.translator/testData/box/expression/cast")
|
||||||
@@ -1666,7 +1666,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Cast extends AbstractBoxJsTest {
|
public static class Cast extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInCast() throws Exception {
|
public void testAllFilesPresentInCast() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/cast"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/cast"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("castExtensionToKMutableProperty.kt")
|
@TestMetadata("castExtensionToKMutableProperty.kt")
|
||||||
@@ -1831,7 +1831,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class CompareTo extends AbstractBoxJsTest {
|
public static class CompareTo extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInCompareTo() throws Exception {
|
public void testAllFilesPresentInCompareTo() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/compareTo"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/compareTo"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("customCompareToMethod.kt")
|
@TestMetadata("customCompareToMethod.kt")
|
||||||
@@ -1846,7 +1846,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class DollarParameter extends AbstractBoxJsTest {
|
public static class DollarParameter extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInDollarParameter() throws Exception {
|
public void testAllFilesPresentInDollarParameter() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/dollarParameter"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/dollarParameter"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("dollarParameter.kt")
|
@TestMetadata("dollarParameter.kt")
|
||||||
@@ -1861,7 +1861,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Equals extends AbstractBoxJsTest {
|
public static class Equals extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInEquals() throws Exception {
|
public void testAllFilesPresentInEquals() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/equals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/equals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("arrays.kt")
|
@TestMetadata("arrays.kt")
|
||||||
@@ -1954,7 +1954,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInEvaluationOrder() throws Exception {
|
public void testAllFilesPresentInEvaluationOrder() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/evaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/evaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("andAndWithBreakContinueReturn.kt")
|
@TestMetadata("andAndWithBreakContinueReturn.kt")
|
||||||
@@ -2137,7 +2137,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class For extends AbstractBoxJsTest {
|
public static class For extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInFor() throws Exception {
|
public void testAllFilesPresentInFor() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/for"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/for"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("forIteratesOverArray.kt")
|
@TestMetadata("forIteratesOverArray.kt")
|
||||||
@@ -2224,7 +2224,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInFunction() throws Exception {
|
public void testAllFilesPresentInFunction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/function"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/function"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("callFunInInit.kt")
|
@TestMetadata("callFunInInit.kt")
|
||||||
@@ -2419,7 +2419,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class IdentifierClash extends AbstractBoxJsTest {
|
public static class IdentifierClash extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInIdentifierClash() throws Exception {
|
public void testAllFilesPresentInIdentifierClash() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identifierClash"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identifierClash"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("overloadedFun.kt")
|
@TestMetadata("overloadedFun.kt")
|
||||||
@@ -2440,7 +2440,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class IdentityEquals extends AbstractBoxJsTest {
|
public static class IdentityEquals extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInIdentityEquals() throws Exception {
|
public void testAllFilesPresentInIdentityEquals() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identityEquals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/identityEquals"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("identityEqualsMethod.kt")
|
@TestMetadata("identityEqualsMethod.kt")
|
||||||
@@ -2461,7 +2461,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class If extends AbstractBoxJsTest {
|
public static class If extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInIf() throws Exception {
|
public void testAllFilesPresentInIf() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/if"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/if"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("ifElseAsExpressionWithThrow.kt")
|
@TestMetadata("ifElseAsExpressionWithThrow.kt")
|
||||||
@@ -2494,7 +2494,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Invoke extends AbstractBoxJsTest {
|
public static class Invoke extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInvoke() throws Exception {
|
public void testAllFilesPresentInInvoke() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/invoke"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/invoke"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("explicitInvokeLambda.kt")
|
@TestMetadata("explicitInvokeLambda.kt")
|
||||||
@@ -2575,7 +2575,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Misc extends AbstractBoxJsTest {
|
public static class Misc extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMisc() throws Exception {
|
public void testAllFilesPresentInMisc() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/misc"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/misc"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classWithoutPackage.kt")
|
@TestMetadata("classWithoutPackage.kt")
|
||||||
@@ -2830,7 +2830,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class StringClass extends AbstractBoxJsTest {
|
public static class StringClass extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInStringClass() throws Exception {
|
public void testAllFilesPresentInStringClass() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringClass"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionMethods.kt")
|
@TestMetadata("extensionMethods.kt")
|
||||||
@@ -2923,7 +2923,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class StringTemplates extends AbstractBoxJsTest {
|
public static class StringTemplates extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInStringTemplates() throws Exception {
|
public void testAllFilesPresentInStringTemplates() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringTemplates"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/stringTemplates"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("objectWithToString.kt")
|
@TestMetadata("objectWithToString.kt")
|
||||||
@@ -2944,7 +2944,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Try extends AbstractBoxJsTest {
|
public static class Try extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInTry() throws Exception {
|
public void testAllFilesPresentInTry() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/try"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/try"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("exceptionToString.kt")
|
@TestMetadata("exceptionToString.kt")
|
||||||
@@ -3007,7 +3007,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class When extends AbstractBoxJsTest {
|
public static class When extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInWhen() throws Exception {
|
public void testAllFilesPresentInWhen() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/when"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/when"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("doWhileWithOneStmWhen.kt")
|
@TestMetadata("doWhileWithOneStmWhen.kt")
|
||||||
@@ -3196,7 +3196,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class While extends AbstractBoxJsTest {
|
public static class While extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInWhile() throws Exception {
|
public void testAllFilesPresentInWhile() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/while"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/expression/while"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("doWhileWithComplexCondition.kt")
|
@TestMetadata("doWhileWithComplexCondition.kt")
|
||||||
@@ -3236,7 +3236,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class ExtensionFunction extends AbstractBoxJsTest {
|
public static class ExtensionFunction extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInExtensionFunction() throws Exception {
|
public void testAllFilesPresentInExtensionFunction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionFunction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionFunction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionForSuperclass.kt")
|
@TestMetadata("extensionForSuperclass.kt")
|
||||||
@@ -3347,7 +3347,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInExtensionProperty() throws Exception {
|
public void testAllFilesPresentInExtensionProperty() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/extensionProperty"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("externalExtensionProperty.kt")
|
@TestMetadata("externalExtensionProperty.kt")
|
||||||
@@ -3392,7 +3392,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInInheritance() throws Exception {
|
public void testAllFilesPresentInInheritance() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inheritance"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inheritance"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("baseCall.kt")
|
@TestMetadata("baseCall.kt")
|
||||||
@@ -3514,7 +3514,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInInterfaces() throws Exception {
|
public void testAllFilesPresentInInterfaces() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inheritance/interfaces"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inheritance/interfaces"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("withDefaultMethod.kt")
|
@TestMetadata("withDefaultMethod.kt")
|
||||||
@@ -3542,7 +3542,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Initialize extends AbstractBoxJsTest {
|
public static class Initialize extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInitialize() throws Exception {
|
public void testAllFilesPresentInInitialize() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/initialize"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/initialize"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classInitializer.kt")
|
@TestMetadata("classInitializer.kt")
|
||||||
@@ -3587,7 +3587,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Inline extends AbstractBoxJsTest {
|
public static class Inline extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInline() throws Exception {
|
public void testAllFilesPresentInInline() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inline"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousFunction.kt")
|
@TestMetadata("anonymousFunction.kt")
|
||||||
@@ -3956,7 +3956,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class InlineEvaluationOrder extends AbstractBoxJsTest {
|
public static class InlineEvaluationOrder extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInlineEvaluationOrder() throws Exception {
|
public void testAllFilesPresentInInlineEvaluationOrder() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineEvaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineEvaluationOrder"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("argumentOfCall.kt")
|
@TestMetadata("argumentOfCall.kt")
|
||||||
@@ -4265,7 +4265,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class InlineMultiFile extends AbstractBoxJsTest {
|
public static class InlineMultiFile extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInlineMultiFile() throws Exception {
|
public void testAllFilesPresentInInlineMultiFile() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anonymousObjectOnCallSite.kt")
|
@TestMetadata("anonymousObjectOnCallSite.kt")
|
||||||
@@ -4442,7 +4442,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class InlineMultiModule extends AbstractBoxJsTest {
|
public static class InlineMultiModule extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInlineMultiModule() throws Exception {
|
public void testAllFilesPresentInInlineMultiModule() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineMultiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anotherModuleValInClosure.kt")
|
@TestMetadata("anotherModuleValInClosure.kt")
|
||||||
@@ -4541,7 +4541,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class InlineSizeReduction extends AbstractBoxJsTest {
|
public static class InlineSizeReduction extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInlineSizeReduction() throws Exception {
|
public void testAllFilesPresentInInlineSizeReduction() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineSizeReduction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineSizeReduction"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineImportCleanup.kt")
|
@TestMetadata("inlineImportCleanup.kt")
|
||||||
@@ -4634,7 +4634,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class InlineStdlib extends AbstractBoxJsTest {
|
public static class InlineStdlib extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInInlineStdlib() throws Exception {
|
public void testAllFilesPresentInInlineStdlib() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineStdlib"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/inlineStdlib"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("callNameClash.kt")
|
@TestMetadata("callNameClash.kt")
|
||||||
@@ -4691,7 +4691,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Java extends AbstractBoxJsTest {
|
public static class Java extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInJava() throws Exception {
|
public void testAllFilesPresentInJava() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/java/abstractList")
|
@TestMetadata("js/js.translator/testData/box/java/abstractList")
|
||||||
@@ -4699,7 +4699,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class AbstractList extends AbstractBoxJsTest {
|
public static class AbstractList extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInAbstractList() throws Exception {
|
public void testAllFilesPresentInAbstractList() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/abstractList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/abstractList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("iterator.kt")
|
@TestMetadata("iterator.kt")
|
||||||
@@ -4720,7 +4720,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInArrayList() throws Exception {
|
public void testAllFilesPresentInArrayList() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/arrayList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/java/arrayList"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("arrayAccess.kt")
|
@TestMetadata("arrayAccess.kt")
|
||||||
@@ -4820,7 +4820,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class JsCode extends AbstractBoxJsTest {
|
public static class JsCode extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInJsCode() throws Exception {
|
public void testAllFilesPresentInJsCode() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsCode"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("break.kt")
|
@TestMetadata("break.kt")
|
||||||
@@ -4961,7 +4961,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class JsModule extends AbstractBoxJsTest {
|
public static class JsModule extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInJsModule() throws Exception {
|
public void testAllFilesPresentInJsModule() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("externalClass.kt")
|
@TestMetadata("externalClass.kt")
|
||||||
@@ -5036,7 +5036,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class JsName extends AbstractBoxJsTest {
|
public static class JsName extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInJsName() throws Exception {
|
public void testAllFilesPresentInJsName() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsName"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/jsName"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("avoidNameClash.kt")
|
@TestMetadata("avoidNameClash.kt")
|
||||||
@@ -5111,7 +5111,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Labels extends AbstractBoxJsTest {
|
public static class Labels extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInLabels() throws Exception {
|
public void testAllFilesPresentInLabels() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/labels"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/labels"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("labelOnExpression.kt")
|
@TestMetadata("labelOnExpression.kt")
|
||||||
@@ -5186,7 +5186,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class MultiFile extends AbstractBoxJsTest {
|
public static class MultiFile extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMultiFile() throws Exception {
|
public void testAllFilesPresentInMultiFile() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiFile"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classOfTheSameNameInAnotherPackage.kt")
|
@TestMetadata("classOfTheSameNameInAnotherPackage.kt")
|
||||||
@@ -5231,7 +5231,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class MultiModule extends AbstractBoxJsTest {
|
public static class MultiModule extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMultiModule() throws Exception {
|
public void testAllFilesPresentInMultiModule() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModule"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("moduleAndVariableNameClash.kt")
|
@TestMetadata("moduleAndVariableNameClash.kt")
|
||||||
@@ -5264,7 +5264,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class MultiModuleWrappers extends AbstractBoxJsTest {
|
public static class MultiModuleWrappers extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMultiModuleWrappers() throws Exception {
|
public void testAllFilesPresentInMultiModuleWrappers() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/multiModuleWrappers/amd")
|
@TestMetadata("js/js.translator/testData/box/multiModuleWrappers/amd")
|
||||||
@@ -5272,7 +5272,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Amd extends AbstractBoxJsTest {
|
public static class Amd extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInAmd() throws Exception {
|
public void testAllFilesPresentInAmd() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/amd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/amd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jsModuleOnPackage.kt")
|
@TestMetadata("jsModuleOnPackage.kt")
|
||||||
@@ -5299,7 +5299,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Common_js extends AbstractBoxJsTest {
|
public static class Common_js extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInCommon_js() throws Exception {
|
public void testAllFilesPresentInCommon_js() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/common_js"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/common_js"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("moduleWithNonIdentifierName.kt")
|
@TestMetadata("moduleWithNonIdentifierName.kt")
|
||||||
@@ -5320,7 +5320,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Plain extends AbstractBoxJsTest {
|
public static class Plain extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInPlain() throws Exception {
|
public void testAllFilesPresentInPlain() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/plain"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/plain"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("moduleWithNonIdentifierName.kt")
|
@TestMetadata("moduleWithNonIdentifierName.kt")
|
||||||
@@ -5341,7 +5341,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Umd extends AbstractBoxJsTest {
|
public static class Umd extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInUmd() throws Exception {
|
public void testAllFilesPresentInUmd() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/umd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiModuleWrappers/umd"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("moduleWithNonIdentifierName.kt")
|
@TestMetadata("moduleWithNonIdentifierName.kt")
|
||||||
@@ -5363,7 +5363,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class MultiPackage extends AbstractBoxJsTest {
|
public static class MultiPackage extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMultiPackage() throws Exception {
|
public void testAllFilesPresentInMultiPackage() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiPackage"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multiPackage"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classesInheritedFromOtherPackage.kt")
|
@TestMetadata("classesInheritedFromOtherPackage.kt")
|
||||||
@@ -5426,7 +5426,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Multideclaration extends AbstractBoxJsTest {
|
public static class Multideclaration extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInMultideclaration() throws Exception {
|
public void testAllFilesPresentInMultideclaration() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multideclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/multideclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("multiValForArray.kt")
|
@TestMetadata("multiValForArray.kt")
|
||||||
@@ -5477,7 +5477,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class NameClashes extends AbstractBoxJsTest {
|
public static class NameClashes extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInNameClashes() throws Exception {
|
public void testAllFilesPresentInNameClashes() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nameClashes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nameClashes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classAndCompanionObjectMembers.kt")
|
@TestMetadata("classAndCompanionObjectMembers.kt")
|
||||||
@@ -5576,7 +5576,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Native extends AbstractBoxJsTest {
|
public static class Native extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInNative() throws Exception {
|
public void testAllFilesPresentInNative() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/native"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/native"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("castToNativeClassChecked.kt")
|
@TestMetadata("castToNativeClassChecked.kt")
|
||||||
@@ -5795,7 +5795,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class NestedTypes extends AbstractBoxJsTest {
|
public static class NestedTypes extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInNestedTypes() throws Exception {
|
public void testAllFilesPresentInNestedTypes() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nestedTypes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/nestedTypes"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("implicitOuterThisFromLambda.kt")
|
@TestMetadata("implicitOuterThisFromLambda.kt")
|
||||||
@@ -5900,7 +5900,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Number extends AbstractBoxJsTest {
|
public static class Number extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInNumber() throws Exception {
|
public void testAllFilesPresentInNumber() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/number"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/number"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("byteAndShortConversions.kt")
|
@TestMetadata("byteAndShortConversions.kt")
|
||||||
@@ -6029,7 +6029,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class ObjectDeclaration extends AbstractBoxJsTest {
|
public static class ObjectDeclaration extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInObjectDeclaration() throws Exception {
|
public void testAllFilesPresentInObjectDeclaration() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/objectDeclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/objectDeclaration"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("dontPolluteObject.kt")
|
@TestMetadata("dontPolluteObject.kt")
|
||||||
@@ -6104,7 +6104,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class OperatorOverloading extends AbstractBoxJsTest {
|
public static class OperatorOverloading extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInOperatorOverloading() throws Exception {
|
public void testAllFilesPresentInOperatorOverloading() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/operatorOverloading"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/operatorOverloading"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("augmentedAssignmentLhs.kt")
|
@TestMetadata("augmentedAssignmentLhs.kt")
|
||||||
@@ -6263,7 +6263,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void testAllFilesPresentInPropertyAccess() throws Exception {
|
public void testAllFilesPresentInPropertyAccess() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyAccess"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classUsesPackageProperties.kt")
|
@TestMetadata("classUsesPackageProperties.kt")
|
||||||
@@ -6386,7 +6386,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class PropertyOverride extends AbstractBoxJsTest {
|
public static class PropertyOverride extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInPropertyOverride() throws Exception {
|
public void testAllFilesPresentInPropertyOverride() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyOverride"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/propertyOverride"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("checkSupertypeOrder.kt")
|
@TestMetadata("checkSupertypeOrder.kt")
|
||||||
@@ -6461,7 +6461,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Range extends AbstractBoxJsTest {
|
public static class Range extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInRange() throws Exception {
|
public void testAllFilesPresentInRange() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/range"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/range"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("creatingProgressions.kt")
|
@TestMetadata("creatingProgressions.kt")
|
||||||
@@ -6530,7 +6530,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Reflection extends AbstractBoxJsTest {
|
public static class Reflection extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInReflection() throws Exception {
|
public void testAllFilesPresentInReflection() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reflection"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jsClass.kt")
|
@TestMetadata("jsClass.kt")
|
||||||
@@ -6605,7 +6605,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Regression extends AbstractBoxJsTest {
|
public static class Regression extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInRegression() throws Exception {
|
public void testAllFilesPresentInRegression() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/regression"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("kt2470.kt")
|
@TestMetadata("kt2470.kt")
|
||||||
@@ -6626,7 +6626,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Reified extends AbstractBoxJsTest {
|
public static class Reified extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInReified() throws Exception {
|
public void testAllFilesPresentInReified() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/reified"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("callChain.kt")
|
@TestMetadata("callChain.kt")
|
||||||
@@ -6749,7 +6749,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Rtti extends AbstractBoxJsTest {
|
public static class Rtti extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInRtti() throws Exception {
|
public void testAllFilesPresentInRtti() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/rtti"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/rtti"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("collectionClassesIsCheck.kt")
|
@TestMetadata("collectionClassesIsCheck.kt")
|
||||||
@@ -6860,7 +6860,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class SafeCall extends AbstractBoxJsTest {
|
public static class SafeCall extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInSafeCall() throws Exception {
|
public void testAllFilesPresentInSafeCall() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/safeCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/safeCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("safeAccess.kt")
|
@TestMetadata("safeAccess.kt")
|
||||||
@@ -6905,7 +6905,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Simple extends AbstractBoxJsTest {
|
public static class Simple extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInSimple() throws Exception {
|
public void testAllFilesPresentInSimple() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/simple"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/simple"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("assign.kt")
|
@TestMetadata("assign.kt")
|
||||||
@@ -7076,7 +7076,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class StandardClasses extends AbstractBoxJsTest {
|
public static class StandardClasses extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInStandardClasses() throws Exception {
|
public void testAllFilesPresentInStandardClasses() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/standardClasses"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/standardClasses"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("any.kt")
|
@TestMetadata("any.kt")
|
||||||
@@ -7163,7 +7163,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class SuperCall extends AbstractBoxJsTest {
|
public static class SuperCall extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInSuperCall() throws Exception {
|
public void testAllFilesPresentInSuperCall() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/superCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/superCall"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("classSuperCall.kt")
|
@TestMetadata("classSuperCall.kt")
|
||||||
@@ -7190,7 +7190,7 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
public static class Trait extends AbstractBoxJsTest {
|
public static class Trait extends AbstractBoxJsTest {
|
||||||
public void testAllFilesPresentInTrait() throws Exception {
|
public void testAllFilesPresentInTrait() throws Exception {
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/trait"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.ANY, true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/trait"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("checkImplementationCharacteristics.kt")
|
@TestMetadata("checkImplementationCharacteristics.kt")
|
||||||
|
|||||||
+11
-77
@@ -6899,37 +6899,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
@TestMetadata("differentReceivers.kt")
|
@TestMetadata("differentReceivers.kt")
|
||||||
public void testDifferentReceivers() throws Exception {
|
public void testDifferentReceivers() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/differentReceivers.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/differentReceivers.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("evaluationOrder.kt")
|
@TestMetadata("evaluationOrder.kt")
|
||||||
public void testEvaluationOrder() throws Exception {
|
public void testEvaluationOrder() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/evaluationOrder.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/evaluationOrder.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("evaluationOrderVar.kt")
|
@TestMetadata("evaluationOrderVar.kt")
|
||||||
public void testEvaluationOrderVar() throws Exception {
|
public void testEvaluationOrderVar() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/evaluationOrderVar.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/evaluationOrderVar.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("extensionDelegated.kt")
|
@TestMetadata("extensionDelegated.kt")
|
||||||
@@ -6941,37 +6923,19 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
@TestMetadata("generic.kt")
|
@TestMetadata("generic.kt")
|
||||||
public void testGeneric() throws Exception {
|
public void testGeneric() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/generic.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/generic.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("inClass.kt")
|
@TestMetadata("inClass.kt")
|
||||||
public void testInClass() throws Exception {
|
public void testInClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/inClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/inClass.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("inlineToDelegateFor.kt")
|
@TestMetadata("inlineToDelegateFor.kt")
|
||||||
public void testInlineToDelegateFor() throws Exception {
|
public void testInlineToDelegateFor() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/inlineToDelegateFor.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/inlineToDelegateFor.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("jvmStaticInObject.kt")
|
@TestMetadata("jvmStaticInObject.kt")
|
||||||
@@ -6989,61 +6953,31 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
|||||||
@TestMetadata("local.kt")
|
@TestMetadata("local.kt")
|
||||||
public void testLocal() throws Exception {
|
public void testLocal() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/local.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/local.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localCaptured.kt")
|
@TestMetadata("localCaptured.kt")
|
||||||
public void testLocalCaptured() throws Exception {
|
public void testLocalCaptured() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/localCaptured.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/localCaptured.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("localDifferentReceivers.kt")
|
@TestMetadata("localDifferentReceivers.kt")
|
||||||
public void testLocalDifferentReceivers() throws Exception {
|
public void testLocalDifferentReceivers() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/localDifferentReceivers.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/localDifferentReceivers.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("memberExtension.kt")
|
@TestMetadata("memberExtension.kt")
|
||||||
public void testMemberExtension() throws Exception {
|
public void testMemberExtension() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/memberExtension.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/memberExtension.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("propertyMetadata.kt")
|
@TestMetadata("propertyMetadata.kt")
|
||||||
public void testPropertyMetadata() throws Exception {
|
public void testPropertyMetadata() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/propertyMetadata.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/delegatedProperty/toDelegateFor/propertyMetadata.kt");
|
||||||
try {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-2
@@ -22,7 +22,6 @@ import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
|||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
import org.jetbrains.kotlin.js.translate.context.TranslationContext
|
import org.jetbrains.kotlin.js.translate.context.TranslationContext
|
||||||
import org.jetbrains.kotlin.js.translate.general.Translation
|
|
||||||
import org.jetbrains.kotlin.js.translate.utils.BindingUtils
|
import org.jetbrains.kotlin.js.translate.utils.BindingUtils
|
||||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
|
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils
|
||||||
import org.jetbrains.kotlin.js.translate.utils.JsDescriptorUtils
|
import org.jetbrains.kotlin.js.translate.utils.JsDescriptorUtils
|
||||||
@@ -36,7 +35,7 @@ class FileDeclarationVisitor(private val context: TranslationContext) : Abstract
|
|||||||
val innerName = context.getInnerNameForDescriptor(propertyDescriptor)
|
val innerName = context.getInnerNameForDescriptor(propertyDescriptor)
|
||||||
val backingFieldRequired = context.bindingContext()[BindingContext.BACKING_FIELD_REQUIRED, propertyDescriptor] ?: false
|
val backingFieldRequired = context.bindingContext()[BindingContext.BACKING_FIELD_REQUIRED, propertyDescriptor] ?: false
|
||||||
if (backingFieldRequired || expression.delegateExpression != null) {
|
if (backingFieldRequired || expression.delegateExpression != null) {
|
||||||
val initializer = expression.delegateExpressionOrInitializer?.let { Translation.translateAsExpression(it, context) }
|
val initializer = context.translateDelegateOrInitializerExpression(expression)
|
||||||
context.addDeclarationStatement(JsAstUtils.newVar(innerName, null))
|
context.addDeclarationStatement(JsAstUtils.newVar(innerName, null))
|
||||||
if (initializer != null) {
|
if (initializer != null) {
|
||||||
context.addTopLevelStatement(JsAstUtils.assignment(innerName.makeRef(), initializer).makeStmt())
|
context.addTopLevelStatement(JsAstUtils.assignment(innerName.makeRef(), initializer).makeStmt())
|
||||||
|
|||||||
+42
-23
@@ -97,15 +97,10 @@ class DefaultPropertyTranslator(
|
|||||||
delegatedCall: ResolvedCall<FunctionDescriptor>,
|
delegatedCall: ResolvedCall<FunctionDescriptor>,
|
||||||
function: JsFunction
|
function: JsFunction
|
||||||
) {
|
) {
|
||||||
val delegateContext = contextWithPropertyMetadataCreationIntrinsified(context(), delegatedCall, getterDescriptor)
|
val host = translateHost(getterDescriptor, function)
|
||||||
|
val delegateContext = context().contextWithPropertyMetadataCreationIntrinsified(delegatedCall, descriptor, host)
|
||||||
val delegatedJsCall = CallTranslator.translate(delegateContext, delegatedCall, delegateReference)
|
val delegatedJsCall = CallTranslator.translate(delegateContext, delegatedCall, delegateReference)
|
||||||
|
|
||||||
if (getterDescriptor.isExtension) {
|
|
||||||
val receiver = function.addParameter(getReceiverParameterName()).name
|
|
||||||
val arguments = (delegatedJsCall as JsInvocation).arguments
|
|
||||||
arguments[0] = receiver.makeRef()
|
|
||||||
}
|
|
||||||
|
|
||||||
val returnResult = JsReturn(delegatedJsCall)
|
val returnResult = JsReturn(delegatedJsCall)
|
||||||
function.addStatement(returnResult)
|
function.addStatement(returnResult)
|
||||||
}
|
}
|
||||||
@@ -118,14 +113,10 @@ class DefaultPropertyTranslator(
|
|||||||
val delegatedCall = bindingContext()[BindingContext.DELEGATED_PROPERTY_RESOLVED_CALL, setterDescriptor]
|
val delegatedCall = bindingContext()[BindingContext.DELEGATED_PROPERTY_RESOLVED_CALL, setterDescriptor]
|
||||||
|
|
||||||
if (delegatedCall != null) {
|
if (delegatedCall != null) {
|
||||||
val delegateContext = contextWithPropertyMetadataCreationIntrinsified(withAliased, delegatedCall, setterDescriptor)
|
val host = translateHost(setterDescriptor, function)
|
||||||
|
val delegateContext = withAliased.contextWithPropertyMetadataCreationIntrinsified(delegatedCall, descriptor, host)
|
||||||
val delegatedJsCall = CallTranslator.translate(delegateContext, delegatedCall, delegateReference)
|
val delegatedJsCall = CallTranslator.translate(delegateContext, delegatedCall, delegateReference)
|
||||||
function.addStatement(delegatedJsCall.makeStmt())
|
function.addStatement(delegatedJsCall.makeStmt())
|
||||||
|
|
||||||
if (setterDescriptor.isExtension) {
|
|
||||||
val receiver = function.addParameter(getReceiverParameterName(), 0).name
|
|
||||||
(delegatedJsCall as JsInvocation).arguments[0] = receiver.makeRef()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
assert(!descriptor.isExtension) { "Unexpected extension property $descriptor}" }
|
assert(!descriptor.isExtension) { "Unexpected extension property $descriptor}" }
|
||||||
@@ -135,19 +126,47 @@ class DefaultPropertyTranslator(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun contextWithPropertyMetadataCreationIntrinsified(
|
private fun translateHost(accessorDescriptor: VariableAccessorDescriptor, function: JsFunction): JsExpression {
|
||||||
context: TranslationContext, delegatedCall: ResolvedCall<FunctionDescriptor>, accessor: VariableAccessorDescriptor
|
return if (accessorDescriptor.isExtension) {
|
||||||
): TranslationContext {
|
function.addParameter(getReceiverParameterName(), 0).name.makeRef()
|
||||||
val propertyNameLiteral = context.program().getStringLiteral(accessor.correspondingVariable.name.asString())
|
}
|
||||||
// 0th argument is instance, 1st is KProperty, 2nd (for setter) is value
|
else {
|
||||||
val fakeArgumentExpression =
|
JsLiteral.THIS
|
||||||
(delegatedCall.valueArgumentsByIndex!![1] as ExpressionValueArgument).valueArgument!!.getArgumentExpression()
|
}
|
||||||
return context.innerContextWithAliasesForExpressions(mapOf(
|
|
||||||
fakeArgumentExpression to JsNew(pureFqn("PropertyMetadata", Namer.kotlinObject()), listOf(propertyNameLiteral))
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun TranslationContext.translateDelegateOrInitializerExpression(expression: KtProperty): JsExpression? {
|
||||||
|
val propertyDescriptor = BindingUtils.getDescriptorForElement(bindingContext(), expression) as VariableDescriptorWithAccessors
|
||||||
|
val expressionPsi = expression.delegateExpressionOrInitializer ?: return null
|
||||||
|
|
||||||
|
val initializer = Translation.translateAsExpression(expressionPsi, this)
|
||||||
|
val toDelegateForCall = bindingContext()[BindingContext.TO_DELEGATE_FOR_RESOLVED_CALL, propertyDescriptor]
|
||||||
|
return if (toDelegateForCall != null) {
|
||||||
|
val innerContext = this.contextWithPropertyMetadataCreationIntrinsified(toDelegateForCall, propertyDescriptor, JsLiteral.THIS)
|
||||||
|
CallTranslator.translate(innerContext, toDelegateForCall, initializer)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
initializer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun TranslationContext.contextWithPropertyMetadataCreationIntrinsified(
|
||||||
|
delegatedCall: ResolvedCall<FunctionDescriptor>,
|
||||||
|
property: VariableDescriptorWithAccessors,
|
||||||
|
host: JsExpression
|
||||||
|
): TranslationContext {
|
||||||
|
val propertyNameLiteral = program().getStringLiteral(property.name.asString())
|
||||||
|
// 0th argument is instance, 1st is KProperty, 2nd (for setter) is value
|
||||||
|
val hostExpression =
|
||||||
|
(delegatedCall.valueArgumentsByIndex!![0] as ExpressionValueArgument).valueArgument!!.getArgumentExpression()
|
||||||
|
val fakeArgumentExpression =
|
||||||
|
(delegatedCall.valueArgumentsByIndex!![1] as ExpressionValueArgument).valueArgument!!.getArgumentExpression()
|
||||||
|
return innerContextWithAliasesForExpressions(mapOf(
|
||||||
|
hostExpression to host,
|
||||||
|
fakeArgumentExpression to JsNew(pureFqn("PropertyMetadata", Namer.kotlinObject()), listOf(propertyNameLiteral))
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
fun KtProperty.hasCustomGetter() = getter?.hasBody() ?: false
|
fun KtProperty.hasCustomGetter() = getter?.hasBody() ?: false
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -204,10 +204,10 @@ public final class ExpressionVisitor extends TranslatorVisitor<JsNode> {
|
|||||||
if (delegateExpression != null) {
|
if (delegateExpression != null) {
|
||||||
SmartList<JsPropertyInitializer> propertyInitializers = new SmartList<JsPropertyInitializer>();
|
SmartList<JsPropertyInitializer> propertyInitializers = new SmartList<JsPropertyInitializer>();
|
||||||
PropertyTranslatorKt.translateAccessors((VariableDescriptorWithAccessors) descriptor, propertyInitializers, context);
|
PropertyTranslatorKt.translateAccessors((VariableDescriptorWithAccessors) descriptor, propertyInitializers, context);
|
||||||
|
JsExpression initializerValue = PropertyTranslatorKt.translateDelegateOrInitializerExpression(context, expression);
|
||||||
|
assert initializerValue != null : "Initializer must be non-null for property with delegate";
|
||||||
JsPropertyInitializer delegateInitializer = new JsPropertyInitializer(
|
JsPropertyInitializer delegateInitializer = new JsPropertyInitializer(
|
||||||
context.program().getStringLiteral(Namer.getDelegateName(descriptor.getName().asString())),
|
context.program().getStringLiteral(Namer.getDelegateName(descriptor.getName().asString())), initializerValue);
|
||||||
Translation.translateAsExpression(delegateExpression, context)
|
|
||||||
);
|
|
||||||
propertyInitializers.add(delegateInitializer);
|
propertyInitializers.add(delegateInitializer);
|
||||||
initializer = new JsObjectLiteral(propertyInitializers, true);
|
initializer = new JsObjectLiteral(propertyInitializers, true);
|
||||||
}
|
}
|
||||||
|
|||||||
+12
-15
@@ -16,16 +16,14 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.js.translate.initializer;
|
package org.jetbrains.kotlin.js.translate.initializer;
|
||||||
|
|
||||||
import com.google.dart.compiler.backend.js.ast.*;
|
import com.google.dart.compiler.backend.js.ast.JsExpression;
|
||||||
|
import com.google.dart.compiler.backend.js.ast.JsStatement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.kotlin.descriptors.PropertyDescriptor;
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor;
|
||||||
import org.jetbrains.kotlin.js.translate.context.Namer;
|
import org.jetbrains.kotlin.js.translate.context.Namer;
|
||||||
import org.jetbrains.kotlin.js.translate.context.TranslationContext;
|
import org.jetbrains.kotlin.js.translate.context.TranslationContext;
|
||||||
import org.jetbrains.kotlin.js.translate.general.Translation;
|
|
||||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils;
|
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils;
|
||||||
import org.jetbrains.kotlin.psi.KtExpression;
|
|
||||||
import org.jetbrains.kotlin.psi.KtProperty;
|
|
||||||
|
|
||||||
import static org.jetbrains.kotlin.js.translate.utils.TranslationUtils.assignmentToBackingField;
|
import static org.jetbrains.kotlin.js.translate.utils.TranslationUtils.assignmentToBackingField;
|
||||||
|
|
||||||
@@ -34,21 +32,20 @@ public final class InitializerUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static JsStatement generateInitializerForProperty(@NotNull TranslationContext context,
|
public static JsStatement generateInitializerForProperty(
|
||||||
|
@NotNull TranslationContext context,
|
||||||
@NotNull PropertyDescriptor descriptor,
|
@NotNull PropertyDescriptor descriptor,
|
||||||
@NotNull JsExpression value) {
|
@NotNull JsExpression value
|
||||||
|
) {
|
||||||
return assignmentToBackingField(context, descriptor, value).makeStmt();
|
return assignmentToBackingField(context, descriptor, value).makeStmt();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static JsStatement generateInitializerForDelegate(@NotNull TranslationContext context, @NotNull KtProperty property) {
|
public static JsStatement generateInitializerForDelegate(
|
||||||
KtExpression delegate = property.getDelegateExpression();
|
@NotNull PropertyDescriptor descriptor,
|
||||||
if (delegate != null) {
|
@NotNull JsExpression value
|
||||||
JsExpression value = Translation.translateAsExpression(delegate, context);
|
) {
|
||||||
String name = property.getName();
|
String name = descriptor.getName().asString();
|
||||||
assert name != null: "Delegate property must have name";
|
return JsAstUtils.defineSimpleProperty(Namer.getDelegateName(name), value);
|
||||||
return JsAstUtils.defineSimpleProperty(Namer.getDelegateName(name), value);
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+17
-10
@@ -16,18 +16,20 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.js.translate.initializer;
|
package org.jetbrains.kotlin.js.translate.initializer;
|
||||||
|
|
||||||
|
import com.google.dart.compiler.backend.js.ast.JsExpression;
|
||||||
import com.google.dart.compiler.backend.js.ast.JsStatement;
|
import com.google.dart.compiler.backend.js.ast.JsStatement;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor;
|
||||||
import org.jetbrains.kotlin.js.translate.context.TranslationContext;
|
import org.jetbrains.kotlin.js.translate.context.TranslationContext;
|
||||||
import org.jetbrains.kotlin.js.translate.general.Translation;
|
import org.jetbrains.kotlin.js.translate.declaration.PropertyTranslatorKt;
|
||||||
import org.jetbrains.kotlin.js.translate.general.TranslatorVisitor;
|
import org.jetbrains.kotlin.js.translate.general.TranslatorVisitor;
|
||||||
|
import org.jetbrains.kotlin.js.translate.utils.BindingUtils;
|
||||||
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils;
|
import org.jetbrains.kotlin.js.translate.utils.JsAstUtils;
|
||||||
import org.jetbrains.kotlin.psi.*;
|
import org.jetbrains.kotlin.psi.*;
|
||||||
|
|
||||||
import static org.jetbrains.kotlin.js.translate.general.Translation.translateAsStatementAndMergeInBlockIfNeeded;
|
import static org.jetbrains.kotlin.js.translate.general.Translation.translateAsStatementAndMergeInBlockIfNeeded;
|
||||||
import static org.jetbrains.kotlin.js.translate.initializer.InitializerUtils.generateInitializerForDelegate;
|
import static org.jetbrains.kotlin.js.translate.initializer.InitializerUtils.generateInitializerForDelegate;
|
||||||
import static org.jetbrains.kotlin.js.translate.initializer.InitializerUtils.generateInitializerForProperty;
|
import static org.jetbrains.kotlin.js.translate.initializer.InitializerUtils.generateInitializerForProperty;
|
||||||
import static org.jetbrains.kotlin.js.translate.utils.BindingUtils.getPropertyDescriptor;
|
|
||||||
|
|
||||||
public final class InitializerVisitor extends TranslatorVisitor<Void> {
|
public final class InitializerVisitor extends TranslatorVisitor<Void> {
|
||||||
@Override
|
@Override
|
||||||
@@ -37,18 +39,23 @@ public final class InitializerVisitor extends TranslatorVisitor<Void> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Void visitProperty(@NotNull KtProperty property, @NotNull TranslationContext context) {
|
public final Void visitProperty(@NotNull KtProperty property, @NotNull TranslationContext context) {
|
||||||
|
PropertyDescriptor descriptor = BindingUtils.getPropertyDescriptor(context.bindingContext(), property);
|
||||||
|
JsExpression value = PropertyTranslatorKt.translateDelegateOrInitializerExpression(context, property);
|
||||||
|
JsStatement statement = null;
|
||||||
|
|
||||||
KtExpression initializer = property.getInitializer();
|
KtExpression initializer = property.getInitializer();
|
||||||
|
KtExpression delegate = property.getDelegateExpression();
|
||||||
if (initializer != null) {
|
if (initializer != null) {
|
||||||
JsStatement statement = generateInitializerForProperty(context, getPropertyDescriptor(context.bindingContext(), property),
|
assert value != null;
|
||||||
Translation.translateAsExpression(initializer, context));
|
statement = generateInitializerForProperty(context, descriptor, value);
|
||||||
if (!JsAstUtils.isEmptyStatement(statement)) {
|
}
|
||||||
context.addStatementsToCurrentBlock(JsAstUtils.flattenStatement(statement));
|
if (delegate != null) {
|
||||||
}
|
assert value != null;
|
||||||
|
statement = generateInitializerForDelegate(descriptor, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
JsStatement delegate = generateInitializerForDelegate(context, property);
|
if (statement != null && !JsAstUtils.isEmptyStatement(statement)) {
|
||||||
if (delegate != null) {
|
context.addStatementsToCurrentBlock(JsAstUtils.flattenStatement(statement));
|
||||||
context.addStatementToCurrentBlock(delegate);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ package org.jetbrains.kotlin.js.translate.utils
|
|||||||
|
|
||||||
import com.google.dart.compiler.backend.js.ast.*
|
import com.google.dart.compiler.backend.js.ast.*
|
||||||
import com.intellij.util.SmartList
|
import com.intellij.util.SmartList
|
||||||
import org.jetbrains.kotlin.descriptors.*
|
import org.jetbrains.kotlin.descriptors.ClassDescriptor
|
||||||
|
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
||||||
|
import org.jetbrains.kotlin.descriptors.PropertyDescriptor
|
||||||
|
import org.jetbrains.kotlin.descriptors.TypeParameterDescriptor
|
||||||
import org.jetbrains.kotlin.js.translate.context.Namer
|
import org.jetbrains.kotlin.js.translate.context.Namer
|
||||||
import org.jetbrains.kotlin.js.translate.context.TranslationContext
|
import org.jetbrains.kotlin.js.translate.context.TranslationContext
|
||||||
import org.jetbrains.kotlin.js.translate.reference.ReferenceTranslator
|
import org.jetbrains.kotlin.js.translate.reference.ReferenceTranslator
|
||||||
|
|||||||
Reference in New Issue
Block a user