Add tests for secondary constructors
This commit is contained in:
@@ -15,5 +15,22 @@ val JS_IR_BACKEND_TEST_WHITELIST = listOf(
|
|||||||
"js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt",
|
"js/js.translator/testData/box/expression/identifierClash/useVariableOfNameOfFunction.kt",
|
||||||
"js/js.translator/testData/box/expression/stringClass/stringConstant.kt",
|
"js/js.translator/testData/box/expression/stringClass/stringConstant.kt",
|
||||||
"js/js.translator/testData/box/expression/when/empty.kt",
|
"js/js.translator/testData/box/expression/when/empty.kt",
|
||||||
"js/js.translator/testData/box/simple/notBoolean.kt"
|
"js/js.translator/testData/box/simple/notBoolean.kt",
|
||||||
|
"js/js.translator/testData/box/simple/primCtorDelegation1.kt",
|
||||||
|
"js/js.translator/testData/box/simple/secCtorDelegation1.kt",
|
||||||
|
"js/js.translator/testData/box/simple/secCtorDelegation2.kt",
|
||||||
|
"js/js.translator/testData/box/simple/secCtorDelegation3.kt",
|
||||||
|
"js/js.translator/testData/box/simple/secCtorDelegation4.kt",
|
||||||
|
"js/js.translator/testData/box/operatorOverloading/notOverload.kt",
|
||||||
|
"js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt",
|
||||||
|
"js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt",
|
||||||
|
"js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt",
|
||||||
|
"js/js.translator/testData/box/extensionProperty/inClass.kt",
|
||||||
|
"js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt",
|
||||||
|
"js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt",
|
||||||
|
"js/js.translator/testData/box/simple/methodDeclarationAndCall.kt",
|
||||||
|
"js/js.translator/testData/box/simple/propertyAccess.kt",
|
||||||
|
"js/js.translator/testData/box/simple/classInstantiation.kt",
|
||||||
|
"js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt",
|
||||||
|
"js/js.translator/testData/box/inheritance/withInitializeMethod.kt"
|
||||||
).map { File(it) }
|
).map { File(it) }
|
||||||
|
|||||||
+30
@@ -8095,6 +8095,12 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("primCtorDelegation1.kt")
|
||||||
|
public void testPrimCtorDelegation1() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/primCtorDelegation1.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("propertiesAsParametersInitialized.kt")
|
@TestMetadata("propertiesAsParametersInitialized.kt")
|
||||||
public void testPropertiesAsParametersInitialized() throws Exception {
|
public void testPropertiesAsParametersInitialized() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt");
|
||||||
@@ -8107,6 +8113,30 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation1.kt")
|
||||||
|
public void testSecCtorDelegation1() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation1.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation2.kt")
|
||||||
|
public void testSecCtorDelegation2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation2.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation3.kt")
|
||||||
|
public void testSecCtorDelegation3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation3.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation4.kt")
|
||||||
|
public void testSecCtorDelegation4() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation4.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("simpleInitializer.kt")
|
@TestMetadata("simpleInitializer.kt")
|
||||||
public void testSimpleInitializer() throws Exception {
|
public void testSimpleInitializer() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/simpleInitializer.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/simpleInitializer.kt");
|
||||||
|
|||||||
+85
-132
@@ -7586,18 +7586,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("internalFunctionFromSuperclass.kt")
|
@TestMetadata("internalFunctionFromSuperclass.kt")
|
||||||
public void testInternalFunctionFromSuperclass() throws Exception {
|
public void testInternalFunctionFromSuperclass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/expression/invoke/internalFunctionFromSuperclass.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("invokeInExtensionFunctionLiteral.kt")
|
@TestMetadata("invokeInExtensionFunctionLiteral.kt")
|
||||||
@@ -9847,18 +9836,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("inClass.kt")
|
@TestMetadata("inClass.kt")
|
||||||
public void testInClass() throws Exception {
|
public void testInClass() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/inClass.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/extensionProperty/inClass.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("privateExtensionProperty.kt")
|
@TestMetadata("privateExtensionProperty.kt")
|
||||||
@@ -10511,18 +10489,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("withInitializeMethod.kt")
|
@TestMetadata("withInitializeMethod.kt")
|
||||||
public void testWithInitializeMethod() throws Exception {
|
public void testWithInitializeMethod() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/withInitializeMethod.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/inheritance/withInitializeMethod.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("js/js.translator/testData/box/inheritance/interfaces")
|
@TestMetadata("js/js.translator/testData/box/inheritance/interfaces")
|
||||||
@@ -16533,35 +16500,13 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("createClassFromOtherPackage.kt")
|
@TestMetadata("createClassFromOtherPackage.kt")
|
||||||
public void testCreateClassFromOtherPackage() throws Exception {
|
public void testCreateClassFromOtherPackage() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackage.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("createClassFromOtherPackageUsingImport.kt")
|
@TestMetadata("createClassFromOtherPackageUsingImport.kt")
|
||||||
public void testCreateClassFromOtherPackageUsingImport() throws Exception {
|
public void testCreateClassFromOtherPackageUsingImport() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/multiPackage/createClassFromOtherPackageUsingImport.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("functionsVisibleFromOtherPackage.kt")
|
@TestMetadata("functionsVisibleFromOtherPackage.kt")
|
||||||
@@ -18744,18 +18689,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("binaryDivOverload.kt")
|
@TestMetadata("binaryDivOverload.kt")
|
||||||
public void testBinaryDivOverload() throws Exception {
|
public void testBinaryDivOverload() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/binaryDivOverload.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compareTo.kt")
|
@TestMetadata("compareTo.kt")
|
||||||
@@ -18812,18 +18746,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("notOverload.kt")
|
@TestMetadata("notOverload.kt")
|
||||||
public void testNotOverload() throws Exception {
|
public void testNotOverload() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/notOverload.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/operatorOverloading/notOverload.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt")
|
@TestMetadata("operatorOverloadOnPropertyCallGetterAndSetterOnlyOnce.kt")
|
||||||
@@ -19127,18 +19050,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("classCreatedInDeeplyNestedPackage.kt")
|
@TestMetadata("classCreatedInDeeplyNestedPackage.kt")
|
||||||
public void testClassCreatedInDeeplyNestedPackage() throws Exception {
|
public void testClassCreatedInDeeplyNestedPackage() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("deeplyNestedPackage.kt")
|
@TestMetadata("deeplyNestedPackage.kt")
|
||||||
@@ -19156,18 +19068,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("initializersOfNestedPackagesExecute.kt")
|
@TestMetadata("initializersOfNestedPackagesExecute.kt")
|
||||||
public void testInitializersOfNestedPackagesExecute() throws Exception {
|
public void testInitializersOfNestedPackagesExecute() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("nestedPackage.kt")
|
@TestMetadata("nestedPackage.kt")
|
||||||
@@ -21096,18 +20997,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("classInstantiation.kt")
|
@TestMetadata("classInstantiation.kt")
|
||||||
public void testClassInstantiation() throws Exception {
|
public void testClassInstantiation() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/classInstantiation.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/classInstantiation.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("comparison.kt")
|
@TestMetadata("comparison.kt")
|
||||||
@@ -21300,18 +21190,7 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("methodDeclarationAndCall.kt")
|
@TestMetadata("methodDeclarationAndCall.kt")
|
||||||
public void testMethodDeclarationAndCall() throws Exception {
|
public void testMethodDeclarationAndCall() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/methodDeclarationAndCall.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
doTest(fileName);
|
||||||
doTest(fileName);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
ignore.printStackTrace();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("minusAssignOnProperty.kt")
|
@TestMetadata("minusAssignOnProperty.kt")
|
||||||
@@ -21405,6 +21284,23 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("primCtorDelegation1.kt")
|
||||||
|
public void testPrimCtorDelegation1() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/primCtorDelegation1.kt");
|
||||||
|
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
||||||
|
doTest(fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("propertiesAsParametersInitialized.kt")
|
@TestMetadata("propertiesAsParametersInitialized.kt")
|
||||||
public void testPropertiesAsParametersInitialized() throws Exception {
|
public void testPropertiesAsParametersInitialized() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertiesAsParametersInitialized.kt");
|
||||||
@@ -21425,6 +21321,63 @@ public class IrBoxJsTestGenerated extends AbstractIrBoxJsTest {
|
|||||||
@TestMetadata("propertyAccess.kt")
|
@TestMetadata("propertyAccess.kt")
|
||||||
public void testPropertyAccess() throws Exception {
|
public void testPropertyAccess() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertyAccess.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/propertyAccess.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation1.kt")
|
||||||
|
public void testSecCtorDelegation1() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation1.kt");
|
||||||
|
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
||||||
|
doTest(fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation2.kt")
|
||||||
|
public void testSecCtorDelegation2() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation2.kt");
|
||||||
|
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
||||||
|
doTest(fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation3.kt")
|
||||||
|
public void testSecCtorDelegation3() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation3.kt");
|
||||||
|
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
||||||
|
doTest(fileName);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
catch (Throwable ignore) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive or add it to whitelist for that.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("secCtorDelegation4.kt")
|
||||||
|
public void testSecCtorDelegation4() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/simple/secCtorDelegation4.kt");
|
||||||
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
if (KotlinTestUtils.RUN_IGNORED_TESTS_AS_REGULAR) {
|
||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1114
|
||||||
|
package foo
|
||||||
|
|
||||||
|
open class Base(val bb: String) {
|
||||||
|
|
||||||
|
open fun foo() = bb
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test(val tt: String) : Base("fail") {
|
||||||
|
|
||||||
|
override fun foo() = tt
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
val t = Test("OK")
|
||||||
|
return t.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1114
|
||||||
|
package foo
|
||||||
|
|
||||||
|
open class Base {
|
||||||
|
val i: Int
|
||||||
|
val i2: Int
|
||||||
|
val i3: Int
|
||||||
|
val bs: String
|
||||||
|
|
||||||
|
constructor(ii1: Int, ii2: Int) {
|
||||||
|
i = ii1
|
||||||
|
i2 = ii2
|
||||||
|
i3 = 30
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(ii: Int): this(ii, 25) {
|
||||||
|
}
|
||||||
|
|
||||||
|
open fun foo() = bs
|
||||||
|
|
||||||
|
init {
|
||||||
|
bs = "fail"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test(val tt: String) : Base(18) {
|
||||||
|
|
||||||
|
override fun foo() = tt
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
val t = Test("OK")
|
||||||
|
return t.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1114
|
||||||
|
package foo
|
||||||
|
|
||||||
|
open class Base(val bs: String) {
|
||||||
|
|
||||||
|
|
||||||
|
val i: Int
|
||||||
|
val i2: Int
|
||||||
|
val i3: Int
|
||||||
|
|
||||||
|
fun foo() = bs
|
||||||
|
|
||||||
|
init {
|
||||||
|
i = 10
|
||||||
|
i2 = 20
|
||||||
|
i3 = 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test : Base {
|
||||||
|
|
||||||
|
val t1: Int
|
||||||
|
val t2: Int
|
||||||
|
|
||||||
|
constructor(tt1: Int, tt2: Int): super("OK") {
|
||||||
|
t1 = tt1
|
||||||
|
t2 = tt2
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
val t = Test(1, 2)
|
||||||
|
return t.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1114
|
||||||
|
package foo
|
||||||
|
|
||||||
|
open class Base {
|
||||||
|
val i: Int
|
||||||
|
val i2: Int
|
||||||
|
val i3: Int
|
||||||
|
val bs: String
|
||||||
|
|
||||||
|
constructor(s:String) {bs = s}
|
||||||
|
|
||||||
|
fun foo() = bs
|
||||||
|
|
||||||
|
init {
|
||||||
|
i = 10
|
||||||
|
i2 = 20
|
||||||
|
i3 = 30
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Test: Base {
|
||||||
|
val t1: Int
|
||||||
|
val t2: Int
|
||||||
|
|
||||||
|
constructor(tt1: Int, tt2:Int) : super("OK") {
|
||||||
|
t1 = tt1
|
||||||
|
t2 = tt2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
val t = Test(1, 2)
|
||||||
|
return t.foo()
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// EXPECTED_REACHABLE_NODES: 1114
|
||||||
|
package foo
|
||||||
|
|
||||||
|
class Test(val bs: String) {
|
||||||
|
|
||||||
|
var i: Int = 0
|
||||||
|
var i2: Int = 0
|
||||||
|
var i3: Int =0
|
||||||
|
|
||||||
|
constructor(ii1: Int, ii2: Int): this("OK") {
|
||||||
|
i = ii1
|
||||||
|
i2 = ii2
|
||||||
|
i3 = 30
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor(ii: Int): this(ii, 18) {
|
||||||
|
}
|
||||||
|
|
||||||
|
fun foo() = bs
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
|
||||||
|
val t = Test(1)
|
||||||
|
return t.foo()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user