Skip to content

Commit 3d5f692

Browse files
committed
Emit the error file contents and highlight it to show errors for rwc errors
1 parent 58fca37 commit 3d5f692

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/harness/rwcRunner.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ module RWC {
5959
});
6060
});
6161

62+
var inputFiles: { unitName: string; content: string; }[] = [];
63+
var otherFiles: { unitName: string; content: string; }[] = [];
6264
var compilerResult: Harness.Compiler.CompilerResult;
6365
it('can compile', () => {
6466
runWithIOLog(ioLog, () => {
6567
harnessCompiler.reset();
6668

6769
// Load the files
68-
var inputFiles: { unitName: string; content: string; }[] = [];
6970
ts.forEach(opts.filenames, fileName => {
7071
inputFiles.push(getHarnessCompilerInputUnit(fileName));
7172
});
@@ -78,7 +79,6 @@ module RWC {
7879
}
7980
}
8081

81-
var otherFiles: { unitName: string; content: string; }[] = [];
8282
ts.forEach(ioLog.filesRead, fileRead => {
8383
var resolvedPath = Harness.Path.switchToForwardSlashes(sys.resolvePath(fileRead.path));
8484
var inInputList = ts.forEach(inputFiles, inputFile=> inputFile.unitName === resolvedPath);
@@ -144,7 +144,9 @@ module RWC {
144144
return null;
145145
}
146146

147-
return Harness.Compiler.minimalDiagnosticsToString(compilerResult.errors);
147+
return Harness.Compiler.minimalDiagnosticsToString(compilerResult.errors) +
148+
sys.newLine + sys.newLine +
149+
Harness.Compiler.getErrorBaseline(inputFiles.concat(otherFiles), compilerResult.errors);
148150
}, false, baselineOpts);
149151
});
150152

0 commit comments

Comments
 (0)