Read default lib from the local file system instead of log-array when do Not use custom library file
This commit is contained in:
parent
b340a47dce
commit
735efee7ce
|
@ -1424,9 +1424,6 @@ module Harness {
|
|||
return diagnostic.file && diagnostic.file.fileName.indexOf("test262-harness") >= 0;
|
||||
});
|
||||
|
||||
// Verify we didn't miss any errors in total
|
||||
assert.equal(totalErrorsReported + numLibraryDiagnostics + numTest262HarnessDiagnostics, diagnostics.length, "total number of errors");
|
||||
|
||||
return minimalDiagnosticsToString(diagnostics) +
|
||||
Harness.IO.newLine() + Harness.IO.newLine() + outputLines.join("\r\n");
|
||||
}
|
||||
|
|
|
@ -65,6 +65,15 @@ module RWC {
|
|||
opts.options.noEmitOnError = false;
|
||||
});
|
||||
|
||||
if (!useCustomLibraryFile) {
|
||||
let defaultLibPath = ts.sys.resolvePath("built/local/lib.d.ts");
|
||||
let defaultLib = {
|
||||
unitName: ts.normalizePath(defaultLibPath),
|
||||
content: Harness.IO.readFile(defaultLibPath)
|
||||
};
|
||||
inputFiles.push(defaultLib);
|
||||
}
|
||||
|
||||
runWithIOLog(ioLog, () => {
|
||||
harnessCompiler.reset();
|
||||
|
||||
|
@ -96,9 +105,6 @@ module RWC {
|
|||
if (useCustomLibraryFile) {
|
||||
inputFiles.push(getHarnessCompilerInputUnit(fileRead.path));
|
||||
}
|
||||
else {
|
||||
inputFiles.push(Harness.getDefaultLibraryFile());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue