|
|
|
@@ -0,0 +1,151 @@
|
|
|
|
|
/*
|
|
|
|
|
* Copyright 2010-2015 JetBrains s.r.o.
|
|
|
|
|
*
|
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
|
*
|
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
*
|
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
|
* limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
package org.jetbrains.kotlin.js.test.semantics;
|
|
|
|
|
|
|
|
|
|
import com.intellij.testFramework.TestDataPath;
|
|
|
|
|
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
|
|
|
|
import org.jetbrains.kotlin.test.JetTestUtils;
|
|
|
|
|
import org.jetbrains.kotlin.test.TestMetadata;
|
|
|
|
|
import org.junit.runner.RunWith;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
|
|
|
|
@SuppressWarnings("all")
|
|
|
|
|
@TestMetadata("compiler/testData/codegen/box/secondaryConstructors")
|
|
|
|
|
@TestDataPath("$PROJECT_ROOT")
|
|
|
|
|
@RunWith(JUnit3RunnerWithInners.class)
|
|
|
|
|
public class SecondaryConstructorTestGenerated extends AbstractSecondaryConstructorTest {
|
|
|
|
|
@TestMetadata("innerClasses.kt")
|
|
|
|
|
public void ignoredInnerClasses() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClasses.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("innerClassesInheritance.kt")
|
|
|
|
|
public void ignoredInnerClassesInheritance() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/innerClassesInheritance.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("localClasses.kt")
|
|
|
|
|
public void ignoredLocalClasses() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/localClasses.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("withNonLocalReturn.kt")
|
|
|
|
|
public void ignoredWithNonLocalReturn() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withNonLocalReturn.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("accessToCompanion.kt")
|
|
|
|
|
public void testAccessToCompanion() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/accessToCompanion.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void testAllFilesPresentInSecondaryConstructors() throws Exception {
|
|
|
|
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/secondaryConstructors"), Pattern.compile("^(.+)\\.kt$"), true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("basicNoPrimaryManySinks.kt")
|
|
|
|
|
public void testBasicNoPrimaryManySinks() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryManySinks.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("basicNoPrimaryOneSink.kt")
|
|
|
|
|
public void testBasicNoPrimaryOneSink() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicNoPrimaryOneSink.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("basicPrimary.kt")
|
|
|
|
|
public void testBasicPrimary() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/basicPrimary.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("clashingDefaultConstructors.kt")
|
|
|
|
|
public void testClashingDefaultConstructors() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/clashingDefaultConstructors.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("dataClasses.kt")
|
|
|
|
|
public void testDataClasses() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/dataClasses.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("defaultArgs.kt")
|
|
|
|
|
public void testDefaultArgs() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/defaultArgs.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("delegationWithPrimary.kt")
|
|
|
|
|
public void testDelegationWithPrimary() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/delegationWithPrimary.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("enums.kt")
|
|
|
|
|
public void testEnums() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/enums.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("generics.kt")
|
|
|
|
|
public void testGenerics() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/generics.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("superCallPrimary.kt")
|
|
|
|
|
public void testSuperCallPrimary() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallPrimary.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("superCallSecondary.kt")
|
|
|
|
|
public void testSuperCallSecondary() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/superCallSecondary.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("varargs.kt")
|
|
|
|
|
public void testVarargs() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/varargs.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("withReturn.kt")
|
|
|
|
|
public void testWithReturn() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturn.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@TestMetadata("withReturnUnit.kt")
|
|
|
|
|
public void testWithReturnUnit() throws Exception {
|
|
|
|
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/secondaryConstructors/withReturnUnit.kt");
|
|
|
|
|
doTest(fileName);
|
|
|
|
|
}
|
|
|
|
|
}
|