JS: move more test to box tests
This commit is contained in:
@@ -1140,10 +1140,6 @@ fun main(args: Array<String>) {
|
|||||||
testClass<AbstractBoxJsTest>() {
|
testClass<AbstractBoxJsTest>() {
|
||||||
model("box/", pattern = "^([^_](.+))\\.kt$")
|
model("box/", pattern = "^([^_](.+))\\.kt$")
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractReservedWordTest>() {
|
|
||||||
model("reservedWords/cases")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
testGroup("js/js.tests/test", "compiler/testData") {
|
testGroup("js/js.tests/test", "compiler/testData") {
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@ fun main(args: Array<String>) {
|
|||||||
generateTestDataForReservedWords()
|
generateTestDataForReservedWords()
|
||||||
}
|
}
|
||||||
|
|
||||||
val TEST_DATA_DIR_FOR_RESERVED_WORDS = "js/js.translator/testData/reservedWords/cases"
|
val TEST_DATA_DIR_FOR_RESERVED_WORDS = "js/js.translator/testData/box/reservedWords"
|
||||||
|
|
||||||
fun generateTestDataForReservedWords() {
|
fun generateTestDataForReservedWords() {
|
||||||
generate(TEST_DATA_DIR_FOR_RESERVED_WORDS) {
|
generate(TEST_DATA_DIR_FOR_RESERVED_WORDS) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
-1069
File diff suppressed because it is too large
Load Diff
@@ -1,85 +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 StandardClassesTest extends SingleFileTranslationTest {
|
|
||||||
|
|
||||||
public StandardClassesTest() {
|
|
||||||
super("standardClasses/");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArray() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArrayAccess() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArrayIsFilledWithNulls() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArrayFunctionConstructor() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArraySize() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArrayConstructorsWithLambda() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: this feature in not supported for some time
|
|
||||||
//TODO: support it. Probably configurable.
|
|
||||||
// (expected = JavaScriptException.class)
|
|
||||||
// public void arrayThrowsExceptionOnOOBaccess() throws Exception {
|
|
||||||
// fooBoxTest();
|
|
||||||
// }
|
|
||||||
|
|
||||||
public void testArraysIterator() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testArrayFactoryMethods() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testStringBuilder() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testHashSetTypeOfElement() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testHashMapTypeOfElement() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void ignore_testThrowableImpl() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testMutableMapRemoveWithCollision() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,38 +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 class SuperCallTest extends SingleFileTranslationTest {
|
|
||||||
public SuperCallTest() {
|
|
||||||
super("superCall/");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testTraitSuperCall() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testClassSuperCall() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testNativeSuperClass() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,62 +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 TraitTest extends SingleFileTranslationTest {
|
|
||||||
|
|
||||||
public TraitTest() {
|
|
||||||
super("trait/");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testTraitAddsFunctionsToClass() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testClassDerivesFromClassAndTrait() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testClassDerivesFromTraitAndClass() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testExample() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testTraitExtendsTrait() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testTraitExtendsTwoTraits() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testFunDelegation() throws Exception {
|
|
||||||
checkFooBoxIsOk("funDelegation.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testDefinitionOrder() throws Exception {
|
|
||||||
fooBoxTest();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testCheckImplementationCharacteristics() throws Exception {
|
|
||||||
checkFooBoxIsOk();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+9
-18
@@ -18,15 +18,6 @@ package org.jetbrains.kotlin.js.test.semantics
|
|||||||
|
|
||||||
import org.jetbrains.kotlin.js.test.BasicBoxTest
|
import org.jetbrains.kotlin.js.test.BasicBoxTest
|
||||||
|
|
||||||
abstract class JsBasicBoxTest(relativePath: String) : BasicBoxTest(
|
|
||||||
BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "cases/",
|
|
||||||
BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "out/"
|
|
||||||
) {
|
|
||||||
init {
|
|
||||||
additionalCommonFileDirectories += BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "/_commonFiles/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class BorrowedTest(relativePath: String) : BasicBoxTest(
|
abstract class BorrowedTest(relativePath: String) : BasicBoxTest(
|
||||||
"compiler/testData/codegen/box/" + relativePath,
|
"compiler/testData/codegen/box/" + relativePath,
|
||||||
BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "out/"
|
BasicBoxTest.TEST_DATA_DIR_PATH + relativePath + "out/"
|
||||||
@@ -43,20 +34,20 @@ abstract class AbstractBoxJsTest() : BasicBoxTest(
|
|||||||
|
|
||||||
abstract class AbstractBridgeTest : BorrowedTest("bridges/")
|
abstract class AbstractBridgeTest : BorrowedTest("bridges/")
|
||||||
|
|
||||||
abstract class AbstractCompanionObjectTest : JsBasicBoxTest("objectIntrinsics/")
|
abstract class AbstractCompanionObjectTest : BorrowedTest("objectIntrinsics/")
|
||||||
|
|
||||||
abstract class AbstractFunctionExpressionTest : JsBasicBoxTest("functionExpression/")
|
abstract class AbstractFunctionExpressionTest : BorrowedTest("functionExpression/")
|
||||||
|
|
||||||
abstract class AbstractReservedWordTest : JsBasicBoxTest("reservedWords/")
|
abstract class AbstractSecondaryConstructorTest : BorrowedTest("secondaryConstructors/")
|
||||||
|
|
||||||
abstract class AbstractSecondaryConstructorTest : JsBasicBoxTest("secondaryConstructors/")
|
abstract class AbstractInnerNestedTest : BorrowedTest("innerNested/")
|
||||||
|
|
||||||
abstract class AbstractInnerNestedTest : JsBasicBoxTest("innerNested/")
|
abstract class AbstractClassesTest : BorrowedTest("classes/")
|
||||||
|
|
||||||
abstract class AbstractClassesTest : JsBasicBoxTest("classes/")
|
abstract class AbstractSuperTest : BorrowedTest("super/")
|
||||||
|
|
||||||
abstract class AbstractSuperTest : JsBasicBoxTest("super/")
|
abstract class AbstractLocalClassesTest : BorrowedTest("localClasses/")
|
||||||
|
|
||||||
abstract class AbstractLocalClassesTest : JsBasicBoxTest("localClasses/")
|
abstract class AbstractNonLocalReturnsTest : BorrowedTest("inline.generated/nonLocalReturns/")
|
||||||
|
|
||||||
abstract class AbstractNonLocalReturnsTest : JsBasicBoxTest("inline.generated/nonLocalReturns/")
|
abstract class AbstractTypeAliasesTests : BorrowedTest("typealias/")
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user