Tests: drop EcmaVersions usage, add test inheritFromJetIterator.

Adapted from https://github.com/develar/kotlin/commit/a9e0a42fb1347fa8e21c86b5a073ef8a7c873da0.
This commit is contained in:
Pavel V. Talanov
2012-08-13 16:04:53 +04:00
parent 0a002bcc53
commit 6febebc7b3
2 changed files with 23 additions and 8 deletions
@@ -16,7 +16,6 @@
package org.jetbrains.k2js.test.semantics;
import org.jetbrains.k2js.config.EcmaVersion;
import org.jetbrains.k2js.translate.context.Namer;
import org.mozilla.javascript.JavaScriptException;
@@ -58,11 +57,11 @@ public final class MiscTest extends AbstractExpressionTest {
}
public void testKt1052_2() throws Exception {
checkFooBoxIsTrue("KT-1052-2.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-1052-2.kt");
}
public void testKt2314() throws Exception {
checkFooBoxIsTrue("KT-2314.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-2314.kt");
}
public void testKt1052() throws Exception {
@@ -71,7 +70,7 @@ public final class MiscTest extends AbstractExpressionTest {
public void testKt740_1() throws Exception {
checkFooBoxIsTrue("KT-740.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-740.kt");
}
public void testKt740_2() throws Exception {
@@ -79,15 +78,15 @@ public final class MiscTest extends AbstractExpressionTest {
}
public void testKt1361_1() throws Exception {
checkFooBoxIsTrue("KT-1361-1.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-1361-1.kt");
}
public void testKt1361_2() throws Exception {
checkFooBoxIsTrue("KT-1361-2.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-1361-2.kt");
}
public void testKt817() throws Exception {
checkFooBoxIsTrue("KT-817.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-817.kt");
}
public void testKt740_3() throws Exception {
@@ -131,7 +130,7 @@ public final class MiscTest extends AbstractExpressionTest {
}
public void testKt1865() throws Exception {
checkFooBoxIsTrue("KT-1865.kt", EcmaVersion.all());
checkFooBoxIsTrue("KT-1865.kt");
}
public void testMainFunInNestedNamespace() throws Exception {
@@ -184,4 +183,8 @@ public final class MiscTest extends AbstractExpressionTest {
catch (JavaScriptException e) {
}
}
public void testInheritFromJetIterator() throws Exception {
fooBoxTest();
}
}
@@ -0,0 +1,12 @@
package foo
class TabIterator : Iterator<Any?> {
override val hasNext:Boolean
get() = false
override fun next():Any? {
return null
}
}
fun box() = !TabIterator().hasNext