Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions src/harness/compilerRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CompilerBaselineRunner extends RunnerBase {
program = _program;
}, function (settings) {
harnessCompiler.setCompilerSettings(tcSettings);
});
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this indentation, put function on the next line.

});

beforeEach(() => {
Expand Down Expand Up @@ -252,7 +252,7 @@ class CompilerBaselineRunner extends RunnerBase {
}
});

it('Correct type baselines for ' + fileName, () => {
it('Correct type/symbol baselines for ' + fileName, () => {
if (fileName.indexOf("APISample") >= 0) {
return;
}
Expand Down Expand Up @@ -289,8 +289,26 @@ class CompilerBaselineRunner extends RunnerBase {

// Produce baselines. The first gives the types for all expressions.
// The second gives symbols for all identifiers.
checkBaseLines(/*isSymbolBaseLine:*/ false);
checkBaseLines(/*isSymbolBaseLine:*/ true);
var e1: Error, e2: Error;
try {
checkBaseLines(/*isSymbolBaseLine:*/ false);
}
catch (e) {
e1 = e;
}

try {
checkBaseLines(/*isSymbolBaseLine:*/ true);
}
catch (e) {
e2 = e;
}

if (e1 || e2) {
throw e1 || e2;
}

return;

function checkBaseLines(isSymbolBaseLine: boolean) {
let fullBaseLine = generateBaseLine(fullResults, isSymbolBaseLine);
Expand Down