Minor fixes

This commit is contained in:
Dan Quirk
2015-07-14 18:54:21 -07:00
parent f33a2b06d4
commit 2818b2b6fd
2 changed files with 5 additions and 6 deletions
+4 -4
View File
@@ -96,7 +96,7 @@ module Utils {
path = "tests/" + path;
}
let content = '';
let content: string = undefined;
try {
content = ts.sys.readFile(Harness.userSpecifiedRoot + path);
}
@@ -812,12 +812,12 @@ module Harness {
sourceText: string,
languageVersion: ts.ScriptTarget) {
// We'll only assert inletiants outside of light mode.
const shouldassertInvariants = !Harness.lightMode;
const shouldAssertInvariants = !Harness.lightMode;
// Only set the parent nodes if we're asserting inletiants. We don't need them otherwise.
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldassertInvariants);
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldAssertInvariants);
if (shouldassertInvariants) {
if (shouldAssertInvariants) {
Utils.assertInvariants(result, /*parent:*/ undefined);
}
+1 -2
View File
@@ -329,8 +329,6 @@ module Harness.SourceMapRecoder {
}
function writeRecordedSpans() {
let markerIds: string[] = [];
function getMarkerId(markerIndex: number) {
let markerId = "";
if (spanMarkerContinues) {
@@ -418,6 +416,7 @@ module Harness.SourceMapRecoder {
writeJsFileLines(currentJsLine);
// Emit markers
var markerIds: string[] = [];
iterateSpans(writeSourceMapMarker);
let jsFileText = getTextOfLine(currentJsLine, jsLineMap, jsFile.code);