KJS: remove PackageTest.java and move actual files to box/
This commit is contained in:
@@ -6537,6 +6537,45 @@ public class BoxJsTestGenerated extends AbstractBoxJsTest {
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("js/js.translator/testData/box/package")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Package extends AbstractBoxJsTest {
|
||||
public void testAllFilesPresentInPackage() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("js/js.translator/testData/box/package"), Pattern.compile("^([^_](.+))\\.kt$"), TargetBackend.JS, true);
|
||||
}
|
||||
|
||||
@TestMetadata("classCreatedInDeeplyNestedPackage.kt")
|
||||
public void testClassCreatedInDeeplyNestedPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/classCreatedInDeeplyNestedPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("deeplyNestedPackage.kt")
|
||||
public void testDeeplyNestedPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("deeplyNestedPackageFunctionCalled.kt")
|
||||
public void testDeeplyNestedPackageFunctionCalled() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/deeplyNestedPackageFunctionCalled.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("initializersOfNestedPackagesExecute.kt")
|
||||
public void testInitializersOfNestedPackagesExecute() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/initializersOfNestedPackagesExecute.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nestedPackage.kt")
|
||||
public void testNestedPackage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("js/js.translator/testData/box/package/nestedPackage.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("js/js.translator/testData/box/propertyAccess")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* 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 org.jetbrains.kotlin.js.test.SingleFileTranslationTest;
|
||||
|
||||
public final class PackageTest extends SingleFileTranslationTest {
|
||||
public PackageTest() {
|
||||
super("package/");
|
||||
}
|
||||
|
||||
public void testNestedPackage() throws Exception {
|
||||
runFunctionOutputTest("nestedPackage.kt", "foo.bar", TEST_FUNCTION, true);
|
||||
}
|
||||
|
||||
public void testDeeplyNestedPackage() throws Exception {
|
||||
runFunctionOutputTest("deeplyNestedPackage.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", TEST_FUNCTION, true);
|
||||
}
|
||||
|
||||
public void testDeeplyNestedPackageFunctionCalled() throws Exception {
|
||||
runFunctionOutputTest("deeplyNestedPackageFunctionCalled.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", TEST_FUNCTION, true);
|
||||
}
|
||||
|
||||
public void testClassCreatedInDeeplyNestedPackage() throws Exception {
|
||||
runFunctionOutputTest("classCreatedInDeeplyNestedPackage.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", TEST_FUNCTION, true);
|
||||
}
|
||||
|
||||
public void testInitializersOfNestedPackagesExecute() throws Exception {
|
||||
runFunctionOutputTest("initializersOfNestedPackagesExecute.kt", "foo1.foo2.foo3.foo5.foo6.foo7.foo8", TEST_FUNCTION, true);
|
||||
}
|
||||
|
||||
public void testMainFunInNestedPackage() throws Exception {
|
||||
checkOutput("mainFunInNestedPackage.kt", "ayee");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,5 +3,5 @@ package foo1.foo2.foo3.foo5.foo6.foo7.foo8
|
||||
fun box() = A().doBox()
|
||||
|
||||
class A() {
|
||||
fun doBox() = true
|
||||
fun doBox() = "OK"
|
||||
}
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package foo1.foo2.foo3.foo5.foo6.foo7.foo8
|
||||
|
||||
fun box() = true
|
||||
fun box() = "OK"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package foo1.foo2.foo3.foo5.foo6.foo7.foo8
|
||||
|
||||
fun box() = f()
|
||||
fun f() = true
|
||||
fun f() = "OK"
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
package foo1.foo2.foo3.foo5.foo6.foo7.foo8
|
||||
|
||||
val f = true
|
||||
val f = "OK"
|
||||
|
||||
fun box() = f
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
package foo.bar
|
||||
|
||||
fun box() = true
|
||||
fun box() = "OK"
|
||||
@@ -1,5 +0,0 @@
|
||||
package a.b.c
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
println("ayee")
|
||||
}
|
||||
Reference in New Issue
Block a user