Address CR

This commit is contained in:
Yui T 2015-08-26 12:50:00 -07:00
parent 735efee7ce
commit 8a4c56bb76
2 changed files with 7 additions and 14 deletions

View file

@ -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");
}

View file

@ -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);
}