mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 02:33:53 -06:00
Address CR
This commit is contained in:
parent
735efee7ce
commit
8a4c56bb76
@ -1415,15 +1415,7 @@ module Harness {
|
||||
assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName);
|
||||
});
|
||||
|
||||
let numLibraryDiagnostics = ts.countWhere(diagnostics, diagnostic => {
|
||||
return diagnostic.file && (isLibraryFile(diagnostic.file.fileName) || isBuiltFile(diagnostic.file.fileName));
|
||||
});
|
||||
|
||||
let numTest262HarnessDiagnostics = ts.countWhere(diagnostics, diagnostic => {
|
||||
// Count an error generated from tests262-harness folder.This should only apply for test262
|
||||
return diagnostic.file && diagnostic.file.fileName.indexOf("test262-harness") >= 0;
|
||||
});
|
||||
|
||||
assert.equal(totalErrorsReported, diagnostics.length, "total number of errors");
|
||||
return minimalDiagnosticsToString(diagnostics) +
|
||||
Harness.IO.newLine() + Harness.IO.newLine() + outputLines.join("\r\n");
|
||||
}
|
||||
|
||||
@ -19,6 +19,12 @@ module RWC {
|
||||
}
|
||||
}
|
||||
|
||||
let defaultLibPath = ts.sys.resolvePath("built/local/lib.d.ts");
|
||||
let defaultLib = {
|
||||
unitName: ts.normalizePath(defaultLibPath),
|
||||
content: Harness.IO.readFile(defaultLibPath)
|
||||
};
|
||||
|
||||
export function runRWCTest(jsonPath: string) {
|
||||
describe("Testing a RWC project: " + jsonPath, () => {
|
||||
let inputFiles: { unitName: string; content: string; }[] = [];
|
||||
@ -66,11 +72,6 @@ module RWC {
|
||||
});
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user