From 3d5f692c0a6bd0eb94065d8f07127f514e4ecb5e Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Wed, 20 Aug 2014 15:44:52 -0700 Subject: [PATCH] Emit the error file contents and highlight it to show errors for rwc errors --- src/harness/rwcRunner.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index be6787ae0d6..9e06808550e 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -59,13 +59,14 @@ module RWC { }); }); + var inputFiles: { unitName: string; content: string; }[] = []; + var otherFiles: { unitName: string; content: string; }[] = []; var compilerResult: Harness.Compiler.CompilerResult; it('can compile', () => { runWithIOLog(ioLog, () => { harnessCompiler.reset(); // Load the files - var inputFiles: { unitName: string; content: string; }[] = []; ts.forEach(opts.filenames, fileName => { inputFiles.push(getHarnessCompilerInputUnit(fileName)); }); @@ -78,7 +79,6 @@ module RWC { } } - var otherFiles: { unitName: string; content: string; }[] = []; ts.forEach(ioLog.filesRead, fileRead => { var resolvedPath = Harness.Path.switchToForwardSlashes(sys.resolvePath(fileRead.path)); var inInputList = ts.forEach(inputFiles, inputFile=> inputFile.unitName === resolvedPath); @@ -144,7 +144,9 @@ module RWC { return null; } - return Harness.Compiler.minimalDiagnosticsToString(compilerResult.errors); + return Harness.Compiler.minimalDiagnosticsToString(compilerResult.errors) + + sys.newLine + sys.newLine + + Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors); }, false, baselineOpts); });