From bd4aed25da30995abcc5969ad7d14d9c6dd869a5 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Sun, 14 Dec 2014 11:16:50 -0800 Subject: [PATCH] Don't convert the tree to JSON before checking it. Just check it directly. --- src/harness/fourslash.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 18d34e94b03..69bc2962625 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -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();