Remove unnecessary code in IteratorForTranslator.
Introduce failOnEcma5 once again =(. One of tests fail due to kotlin_lib_v* details.
This commit is contained in:
@@ -219,4 +219,9 @@ public abstract class BasicTest extends KotlinTestWithEnvironment {
|
||||
protected String expected(@NotNull String testName) {
|
||||
return getExpectedPath() + testName + ".out";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected static List<EcmaVersion> failOnEcma5() {
|
||||
return Collections.singletonList(EcmaVersion.v3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,6 @@ import org.jetbrains.k2js.test.config.TestConfigWithUnitTests;
|
||||
import org.jetbrains.k2js.test.rhino.RhinoSystemOutputChecker;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -76,13 +75,14 @@ public abstract class JsUnitTestBase extends MultipleFilesTranslationTest {
|
||||
}
|
||||
|
||||
public void runTestFile(@NotNull String pathToTestFile) throws Exception {
|
||||
Iterable<EcmaVersion> versions = Collections.singletonList(EcmaVersion.v3);
|
||||
Iterable<EcmaVersion> versions = failOnEcma5();
|
||||
String testName = pathToTestFile.substring(pathToTestFile.lastIndexOf("/"));
|
||||
generateJavaScriptFiles(Lists.newArrayList(pathToTestFile), testName, MainCallParameters.noCall(), versions,
|
||||
TestConfigWithUnitTests.FACTORY);
|
||||
runRhinoTests(testName, versions, new RhinoSystemOutputChecker(""));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Test createTestSuiteForFile(@NotNull String file, @NotNull String... ignoreFailedTestCases) throws Exception {
|
||||
performTests(file);
|
||||
JS_UNIT_TEST_REPORTER.ignoreTests(ignoreFailedTestCases);
|
||||
|
||||
@@ -59,7 +59,8 @@ public final class StandardClassesTest extends SingleFileTranslationTest {
|
||||
// }
|
||||
|
||||
|
||||
//TODO: fails on ecma 5 because of ArrayIterator declaration: ecma 5 expects hasNext to be property while it is a function
|
||||
public void testArraysIterator() throws Exception {
|
||||
fooBoxTest();
|
||||
fooBoxTest(failOnEcma5());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user