Search in sources :

Example 1 with RhinoSystemOutputChecker

use of org.jetbrains.kotlin.js.test.rhino.RhinoSystemOutputChecker in project kotlin by JetBrains.

the class JsUnitTestBase method runTestFile.

public void runTestFile(@NotNull String pathToTestFile) throws Exception {
    Iterable<EcmaVersion> versions = DEFAULT_ECMA_VERSIONS;
    String testName = pathToTestFile.substring(pathToTestFile.lastIndexOf("/"));
    generateJavaScriptFiles(Collections.singletonList(pathToTestFile), testName, MainCallParameters.noCall(), versions);
    runRhinoTests(testName, versions, new RhinoSystemOutputChecker(""));
}
Also used : RhinoSystemOutputChecker(org.jetbrains.kotlin.js.test.rhino.RhinoSystemOutputChecker) EcmaVersion(org.jetbrains.kotlin.js.config.EcmaVersion)

Example 2 with RhinoSystemOutputChecker

use of org.jetbrains.kotlin.js.test.rhino.RhinoSystemOutputChecker in project kotlin by JetBrains.

the class SingleFileTranslationTest method checkOutput.

private void checkOutput(@NotNull String kotlinFilename, @NotNull String expectedResult, @NotNull Iterable<EcmaVersion> ecmaVersions, String... args) throws Exception {
    generateJavaScriptFiles(getInputFilePath(kotlinFilename), MainCallParameters.mainWithArguments(Lists.newArrayList(args)), ecmaVersions);
    runRhinoTests(getBaseName(kotlinFilename), ecmaVersions, new RhinoSystemOutputChecker(expectedResult));
}
Also used : RhinoSystemOutputChecker(org.jetbrains.kotlin.js.test.rhino.RhinoSystemOutputChecker)

Aggregations

RhinoSystemOutputChecker (org.jetbrains.kotlin.js.test.rhino.RhinoSystemOutputChecker)2 EcmaVersion (org.jetbrains.kotlin.js.config.EcmaVersion)1