Skip to content

Commit 8a4c56b

Browse files
author
Yui T
committed
Address CR
1 parent 735efee commit 8a4c56b

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/harness/harness.ts

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,15 +1415,7 @@ module Harness {
14151415
assert.equal(markedErrorCount, fileErrors.length, "count of errors in " + inputFile.unitName);
14161416
});
14171417

1418-
let numLibraryDiagnostics = ts.countWhere(diagnostics, diagnostic => {
1419-
return diagnostic.file && (isLibraryFile(diagnostic.file.fileName) || isBuiltFile(diagnostic.file.fileName));
1420-
});
1421-
1422-
let numTest262HarnessDiagnostics = ts.countWhere(diagnostics, diagnostic => {
1423-
// Count an error generated from tests262-harness folder.This should only apply for test262
1424-
return diagnostic.file && diagnostic.file.fileName.indexOf("test262-harness") >= 0;
1425-
});
1426-
1418+
assert.equal(totalErrorsReported, diagnostics.length, "total number of errors");
14271419
return minimalDiagnosticsToString(diagnostics) +
14281420
Harness.IO.newLine() + Harness.IO.newLine() + outputLines.join("\r\n");
14291421
}

src/harness/rwcRunner.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ module RWC {
1919
}
2020
}
2121

22+
let defaultLibPath = ts.sys.resolvePath("built/local/lib.d.ts");
23+
let defaultLib = {
24+
unitName: ts.normalizePath(defaultLibPath),
25+
content: Harness.IO.readFile(defaultLibPath)
26+
};
27+
2228
export function runRWCTest(jsonPath: string) {
2329
describe("Testing a RWC project: " + jsonPath, () => {
2430
let inputFiles: { unitName: string; content: string; }[] = [];
@@ -66,11 +72,6 @@ module RWC {
6672
});
6773

6874
if (!useCustomLibraryFile) {
69-
let defaultLibPath = ts.sys.resolvePath("built/local/lib.d.ts");
70-
let defaultLib = {
71-
unitName: ts.normalizePath(defaultLibPath),
72-
content: Harness.IO.readFile(defaultLibPath)
73-
};
7475
inputFiles.push(defaultLib);
7576
}
7677

0 commit comments

Comments
 (0)