Skip to content

Commit bd4aed2

Browse files
Don't convert the tree to JSON before checking it. Just check it directly.
1 parent f5d622f commit bd4aed2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/harness/fourslash.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,12 +1434,7 @@ module FourSlash {
14341434
this.raiseError('Mismatched incremental/reference syntactic diagnostics for file ' + this.activeFile.fileName + '.\n=== Incremental diagnostics ===\n' + incrementalSyntaxDiagnostics + '\n=== Reference Diagnostics ===\n' + referenceSyntaxDiagnostics);
14351435
}
14361436

1437-
var incrementalSourceFileJSON = Utils.sourceFileToJSON(incrementalSourceFile);
1438-
var referenceSourceFileJSON = Utils.sourceFileToJSON(referenceSourceFile);
1439-
1440-
if (incrementalSyntaxDiagnostics !== referenceSyntaxDiagnostics) {
1441-
this.raiseError('Mismatched incremental/reference ast for file ' + this.activeFile.fileName + '.\n=== Incremental AST ===\n' + incrementalSourceFileJSON + '\n=== Reference AST ===\n' + referenceSourceFileJSON);
1442-
}
1437+
Utils.assertStructuralEquals(incrementalSourceFile, referenceSourceFile);
14431438

14441439
//if (this.editValidation !== IncrementalEditValidation.SyntacticOnly) {
14451440
// var compiler = new TypeScript.TypeScriptCompiler();

0 commit comments

Comments
 (0)