use of org.eclipse.n4js.cli.N4jscOptions in project n4js by eclipse.
the class AT_GHOLD_212_transpilecrashTest method testCompileOfExtendedIterator_from_RuntimeLibrary.
/**
* The Problem was, that nothing was compiled.
*/
@Test
public void testCompileOfExtendedIterator_from_RuntimeLibrary() {
File proot = new File(workspace, PACKAGES);
N4jscOptions options = COMPILE(proot);
CliCompileResult cliResult = n4jsc(options, VALIDATION_ERRORS);
// Make sure, we get here and have exactly one file compiled:
assertEquals(cliResult.toString(), 1, cliResult.getTranspiledFilesCount());
}
use of org.eclipse.n4js.cli.N4jscOptions in project n4js by eclipse.
the class AT_IDEBUG_532_transpilecrashTest method testCompileOfExtendedIterator_from_RuntimeLibrary.
/**
* The Problem was, that nothing was compiled.
*/
@Test
public void testCompileOfExtendedIterator_from_RuntimeLibrary() {
File proot = new File(workspace, PACKAGES);
N4jscOptions options = COMPILE(proot);
CliCompileResult cliResult = n4jsc(options);
// Make sure, we get here and have exactly one file compiled:
assertEquals(cliResult.toString(), 0, cliResult.getTranspiledFilesCount(proot.toPath().resolve("APIx")));
assertEquals(cliResult.toString(), 1, cliResult.getTranspiledFilesCount(proot.toPath().resolve("IMPLx")));
}
use of org.eclipse.n4js.cli.N4jscOptions in project n4js by eclipse.
the class AT_IDEBUG_695_CannotSetFinalFieldInCtorForStaticPolyfillsTest method compileCheckFinalFieldCanBeSetInInheritedCtor_ExpectCanBeSet.
/**
*/
@Test
public void compileCheckFinalFieldCanBeSetInInheritedCtor_ExpectCanBeSet() {
Path projectDir = workspace.toPath().resolve(WS_IDEBUG_695);
Path fileToRun = projectDir.resolve("src-gen/Main.js");
N4jscOptions options = COMPILE(workspace);
CliCompileResult cliResult = n4jsc(options, VALIDATION_ERRORS);
assertEquals(cliResult.toString(), 2, cliResult.getTranspiledFilesCount());
ProcessResult nodejsResult = nodejsRun(projectDir, fileToRun);
assertEquals(nodejsResult.toString(), "A.a == 5: true", nodejsResult.getStdOut());
}
use of org.eclipse.n4js.cli.N4jscOptions in project n4js by eclipse.
the class AT_IDEBUG_542_missing_dep_to_project_under_testTest method testCompileOfExtendedIterator_from_RuntimeLibrary.
/**
* The Problem was, that nothing was compiled.
*/
@Test
public void testCompileOfExtendedIterator_from_RuntimeLibrary() {
File proot = new File(workspace, PACKAGES);
N4jscOptions options = COMPILE(proot);
CliCompileResult cliResult = n4jsc(options, VALIDATION_ERRORS);
// Make sure, we get here and have exactly two files compiled:
assertEquals(cliResult.toString(), 0, cliResult.getTranspiledFilesCount(proot.toPath().resolve("APIx")));
assertEquals(cliResult.toString(), 2, cliResult.getTranspiledFilesCount(proot.toPath().resolve("APIx-test")));
}
use of org.eclipse.n4js.cli.N4jscOptions in project n4js by eclipse.
the class AT_IDEBUG_654_MissingPolyfillImportsTest method compileCheckPolyfillImports_ExpectExist.
/**
*/
@Test
public void compileCheckPolyfillImports_ExpectExist() {
Path projectDir = workspace.toPath().resolve(WS_IDEBUG_654_2);
Path fileToRun = projectDir.resolve("src-gen/Main.js");
N4jscOptions options = COMPILE(workspace);
CliCompileResult cliResult = n4jsc(options, VALIDATION_ERRORS);
assertEquals(cliResult.toString(), 5, cliResult.getTranspiledFilesCount());
ProcessResult nodejsResult = nodejsRun(projectDir, fileToRun);
assertEquals(nodejsResult.toString(), "functionFromModuleA\n" + "variableFromModuleB\n" + "variableFromModuleC\n" + "variableFromModuleC", nodejsResult.getStdOut());
}
Aggregations