Don't convert the tree to JSON before checking it. Just check it directly.

This commit is contained in:
Cyrus Najmabadi 2014-12-14 11:16:50 -08:00
parent f5d622f0c9
commit bd4aed25da

View file

@ -1434,12 +1434,7 @@ module FourSlash {
this.raiseError('Mismatched incremental/reference syntactic diagnostics for file ' + this.activeFile.fileName + '.\n=== Incremental diagnostics ===\n' + incrementalSyntaxDiagnostics + '\n=== Reference Diagnostics ===\n' + referenceSyntaxDiagnostics);
}
var incrementalSourceFileJSON = Utils.sourceFileToJSON(incrementalSourceFile);
var referenceSourceFileJSON = Utils.sourceFileToJSON(referenceSourceFile);
if (incrementalSyntaxDiagnostics !== referenceSyntaxDiagnostics) {
this.raiseError('Mismatched incremental/reference ast for file ' + this.activeFile.fileName + '.\n=== Incremental AST ===\n' + incrementalSourceFileJSON + '\n=== Reference AST ===\n' + referenceSourceFileJSON);
}
Utils.assertStructuralEquals(incrementalSourceFile, referenceSourceFile);
//if (this.editValidation !== IncrementalEditValidation.SyntacticOnly) {
// var compiler = new TypeScript.TypeScriptCompiler();