JS backend: remove RegressionMergeEcmaTest

This commit is contained in:
Erokhin Stanislav
2013-09-19 18:39:07 +04:00
parent 6f5cd974a3
commit 571bcf63dc
30 changed files with 100 additions and 253 deletions
@@ -29,7 +29,15 @@ public final class ClassInheritanceTest extends SingleFileTranslationTest {
}
public void testMethodOverride() throws Exception {
fooBoxTest();
checkFooBoxIsOk();
}
public void testBaseCall() throws Exception {
checkFooBoxIsOk();
}
public void testCrazyInheritance() throws Exception {
checkFooBoxIsOk();
}
public void testValOverride() throws Exception {
@@ -5,7 +5,7 @@ import org.jetbrains.k2js.test.SingleFileTranslationTest;
public final class ClassObjectTest extends SingleFileTranslationTest {
public ClassObjectTest() {
super("class_object/");
super("classObject/");
}
public void testSimple() throws Exception {
@@ -35,6 +35,9 @@ public class DelegatePropertyTest extends SingleFileTranslationTest {
checkFooBoxIsOk();
}
public void testDelegateWithPropertyAccess() throws Exception {
checkFooBoxIsOk();
}
public void testDelegateByTopLevelFun() throws Exception {
checkFooBoxIsOk();
@@ -0,0 +1,37 @@
/*
* Copyright 2010-2013 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.k2js.test.semantics;
import org.jetbrains.k2js.test.SingleFileTranslationTest;
public class InitializerTest extends SingleFileTranslationTest {
public InitializerTest() {
super("initialize/");
}
public void testRootValInit() throws Exception {
checkFooBoxIsOk();
}
public void testRootPackageValInit() throws Exception {
runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", "_", "box", "OK");
}
public void testClassInitializer() throws Exception {
checkFooBoxIsOk();
}
}
@@ -29,9 +29,11 @@ public final class NameClashesTest extends SingleFileTranslationTest {
fooBoxTest();
}
//TODO:
@SuppressWarnings("UnusedDeclaration")
public void TODO_testDifferenceInCapitalization() throws Exception {
fooBoxTest();
public void testOverloadExtension() throws Exception {
checkFooBoxIsOk();
}
public void testDifferenceInCapitalization() throws Exception {
checkFooBoxIsOk();
}
}
@@ -39,6 +39,9 @@ public final class PropertyAccessTest extends SingleFileTranslationTest {
fooBoxTest();
}
public void testBackendField() throws Exception {
checkFooBoxIsOk();
}
public void testSetter() throws Exception {
runFunctionOutputTest("setter.kt", "foo", "f", 99.0);
@@ -24,6 +24,10 @@ public class RTTITest extends SingleFileTranslationTest {
super("rtti/");
}
public void testRttiForClass() throws Exception {
checkFooBoxIsOk();
}
public void testIsSameClass() throws Exception {
fooBoxTest();
}
@@ -1,93 +0,0 @@
/*
* Copyright 2010-2013 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.k2js.test.semantics;
import org.jetbrains.k2js.test.SingleFileTranslationTest;
public class RegressionMergeEcmaTest extends SingleFileTranslationTest {
public RegressionMergeEcmaTest() {
super("mergeEcma/");
}
public void testObjectWithMethods() throws Exception {
fooBoxTest();
}
public void testEcmaDelegate() throws Exception {
checkFooBoxIsOk();
}
public void testEcmaObject() throws Exception {
checkFooBoxIsOk();
}
public void testEcmaSimple() throws Exception {
checkFooBoxIsOk();
}
public void testMethodOverride() throws Exception {
checkFooBoxIsOk();
}
public void testMethodInClass() throws Exception {
checkFooBoxIsOk();
}
public void testGetSetProperty() throws Exception {
checkFooBoxIsOk();
}
public void testRootValInit() throws Exception {
checkFooBoxIsOk();
}
public void testRootPackageValInit() throws Exception {
runFunctionOutputTest(DEFAULT_ECMA_VERSIONS, getTestName(true) + ".kt", "_", "box", "OK");
}
public void testIsClassSupport() throws Exception {
checkFooBoxIsOk();
}
public void testCrazyExtension() throws Exception {
checkFooBoxIsOk();
}
public void testOverloadFun() throws Exception {
checkFooBoxIsOk();
}
public void testLiteralFun() throws Exception {
checkFooBoxIsOk();
}
public void testOverloadExtension() throws Exception {
checkFooBoxIsOk();
}
public void testClassInitializer() throws Exception {
checkFooBoxIsOk();
}
public void testBackendField() throws Exception {
checkFooBoxIsOk();
}
public void testExtensionClass() throws Exception {
checkFooBoxIsOk();
}
}
@@ -1,15 +1,27 @@
package foo
open class C() {
open fun f(): Any = "C f"
open class A {
fun f1(): Int {
return 1
}
open fun f2(): Int {
return 3
}
}
class D() : C() {
override fun f(): String = "D f"
class B: A() {
override fun f2(): Int {
return 2
}
}
fun box(): Boolean {
val d : C = D()
if(d.f() != "D f") return false
return true
fun box(): String {
val a = A()
if (a.f1() != 1) return "a.f1() != 1, it: ${a.f1()}"
if (a.f2() != 3) return "a.f2() != 3, it: ${a.f2()}"
val b = B();
if (b.f1() != 1) return "b.f1() != 1, it: ${b.f1()}"
if (b.f2() != 2) return "b.f2() != 2, it: ${b.f2()}"
return "OK"
}
@@ -1,9 +0,0 @@
package foo
val a: Int = 1
get() = $a + 1
fun box(): String {
if (a != 2) return "a != 2, it: $a"
return "OK"
}
@@ -1,14 +0,0 @@
package foo
open class A(val name: String) {
fun foo(): String {
return name
}
}
object B : A("OK")
fun box(): String {
val OK = B.foo()
return OK
}
@@ -1,12 +0,0 @@
package foo
open class A {
val a = "OK"
}
class B: A()
fun box(): String {
return B().a
}
@@ -1,27 +0,0 @@
package foo
class A {
val a: Int
get() {
return 2
}
var b: Int = 1
get() {
return $b + 1;
}
set(value: Int) {
$b = value;
}
}
fun box(): String {
val a = A()
if (a.a != 2) return "a.a != 2, it: ${a.a}"
if (a.b != 2) return "a.b != 2, it: ${a.b}"
a.b = 3
if (a.b != 4) return "a.b != 4, it: ${a.b}"
return "OK"
}
@@ -1,9 +0,0 @@
package foo
fun ok(f: (s: String) -> String): String {
return f("O");
}
fun box(): String {
return ok { (s) -> s + "K" }
}
@@ -1,14 +0,0 @@
package foo
class A {
fun foo(): Int {
return 1
}
}
fun box(): String {
val a = A()
if (a.foo() != 1) return "a.foo() != 1, it: ${a.foo()}"
return "OK"
}
@@ -1,27 +0,0 @@
package foo
open class A {
fun f1(): Int {
return 1
}
open fun f2(): Int {
return 3
}
}
class B: A() {
override fun f2(): Int {
return 2
}
}
fun box(): String {
val a = A()
if (a.f1() != 1) return "a.f1() != 1, it: ${a.f1()}"
if (a.f2() != 3) return "a.f2() != 3, it: ${a.f2()}"
val b = B();
if (b.f1() != 1) return "b.f1() != 1, it: ${b.f1()}"
if (b.f2() != 2) return "b.f2() != 2, it: ${b.f2()}"
return "OK"
}
@@ -1,22 +0,0 @@
package foo
class Test {
private val a = object {
fun c() = 3
fun b() = 2
}
fun doTest(): Boolean {
if (a.c() != 3) {
return false;
}
if (a.b() != 2) {
return false;
}
return true;
}
}
fun box(): Boolean {
return Test().doTest();
}
@@ -1,12 +0,0 @@
package foo
class A {
fun test(a: Int) {}
fun test() {}
}
fun box(): String {
return "OK"
}
@@ -0,0 +1,17 @@
package foo
class A {
val a: Int = 1
get() = $a + 1
fun getA(): Int {
return $a
}
}
fun box(): String {
val a = A()
if (a.a != 2) return "A().a != 2, it: ${a.a}"
if (a.getA() != 1) return "A().getA() != 1, it: ${a.getA()}"
return "OK"
}