Search in sources :

Example 91 with CliCompileResult

use of org.eclipse.n4js.cli.helper.CliCompileResult in project n4js by eclipse.

the class FrontendHelpTest method testLspOptionHelp.

/**
 */
@Test
public void testLspOptionHelp() {
    String[] args = { "lsp", "--help" };
    CliCompileResult result = n4jsc(args, 0, false);
    assertEquals(result.toString(), getUsageExpectationLSP(), result.getStdOut());
}
Also used : CliCompileResult(org.eclipse.n4js.cli.helper.CliCompileResult) Test(org.junit.Test)

Example 92 with CliCompileResult

use of org.eclipse.n4js.cli.helper.CliCompileResult in project n4js by eclipse.

the class PerformanceReportN4jscJarTest method testPerformanceReportViaEnvironmemtVariable.

/**
 * Enables performance data logging in the headless compiler via the system environment variable
 * {@code N4JSC_PERFORMANCE_REPORT} and asserts the output format of the performance report.
 */
@Test
public void testPerformanceReportViaEnvironmemtVariable() throws IOException {
    // setup system environment variables
    setEnvironmentVariable(N4jscOptions.N4JSC_PERFORMANCE_REPORT_ENV, PERFORMANCE_REPORT_FILE.toString());
    N4jscTestOptions options = COMPILE(PROJECT).performanceKey(// must use other than the default dcBuild!
    N4JSDataCollectors.dcN4JSResource.getId());
    CliCompileResult cliResult = n4jsc(options, VALIDATION_ERRORS);
    makeAssertions(cliResult);
}
Also used : CliCompileResult(org.eclipse.n4js.cli.helper.CliCompileResult) N4jscTestOptions(org.eclipse.n4js.cli.N4jscTestOptions) AbstractCliJarTest(org.eclipse.n4js.cli.helper.AbstractCliJarTest) Test(org.junit.Test)

Aggregations

CliCompileResult (org.eclipse.n4js.cli.helper.CliCompileResult)92 Test (org.junit.Test)90 AbstractCliCompileTest (org.eclipse.n4js.cli.helper.AbstractCliCompileTest)41 N4jscTestOptions (org.eclipse.n4js.cli.N4jscTestOptions)22 File (java.io.File)20 Path (java.nio.file.Path)12 ProcessResult (org.eclipse.n4js.cli.helper.ProcessResult)12 N4jscOptions (org.eclipse.n4js.cli.N4jscOptions)8 AbstractCliJarTest (org.eclipse.n4js.cli.helper.AbstractCliJarTest)6 Gson (com.google.gson.Gson)1 JsonObject (com.google.gson.JsonObject)1 JsonPrimitive (com.google.gson.JsonPrimitive)1 FileReader (java.io.FileReader)1 IOException (java.io.IOException)1 CliTools (org.eclipse.n4js.cli.helper.CliTools)1 CliException (org.eclipse.n4js.cli.helper.CliTools.CliException)1 Ignore (org.junit.Ignore)1