From 8a4c56bb761256906ec7b2af4f342d7eb8c2a094 Mon Sep 17 00:00:00 2001 From: Yui T Date: Wed, 26 Aug 2015 12:50:00 -0700 Subject: [PATCH] Address CR --- src/harness/harness.ts | 10 +--------- src/harness/rwcRunner.ts | 11 ++++++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 097340082e3..5cde3ad3647 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -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"); } diff --git a/src/harness/rwcRunner.ts b/src/harness/rwcRunner.ts index ea6f7b7ebb1..cf748c3070b 100644 --- a/src/harness/rwcRunner.ts +++ b/src/harness/rwcRunner.ts @@ -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); }