From a7774f2868205cfc6a424bd4b37fce76d9c193ed Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 13 Nov 2014 15:15:10 -0800 Subject: [PATCH] Fixed issue in harness where lib.d.ts errors are note counted. --- src/harness/harness.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/harness/harness.ts b/src/harness/harness.ts index d385dd2afc7..3ed4434ee31 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -15,6 +15,7 @@ /// /// +/// /// /// /// @@ -1002,8 +1003,12 @@ module Harness { assert.equal(markedErrorCount, fileErrors.length, 'count of errors in ' + inputFile.unitName); }); + var numLibraryDiagnostics = ts.countWhere(diagnostics, diagnostic => { + return diagnostic.filename && isLibraryFile(diagnostic.filename); + }); + // Verify we didn't miss any errors in total - assert.equal(totalErrorsReported, diagnostics.length, 'total number of errors'); + assert.equal(totalErrorsReported + numLibraryDiagnostics, diagnostics.length, 'total number of errors'); return minimalDiagnosticsToString(diagnostics) + sys.newLine + sys.newLine + outputLines.join('\r\n');