Skip to content

Commit 1a4299e

Browse files
Merge branch 'master' into indentSimplification
2 parents 103bb34 + eb92b53 commit 1a4299e

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/harness/compilerRunner.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ class CompilerBaselineRunner extends RunnerBase {
152152
if (this.errors) {
153153
Harness.Baseline.runBaseline('Correct errors for ' + fileName, justName.replace(/\.ts$/, '.errors.txt'), (): string => {
154154
if (result.errors.length === 0) return null;
155-
156155
return getErrorBaseline(toBeCompiled, otherFiles, result);
157156
});
158157
}

src/harness/harness.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ module Harness {
835835
// Register input files
836836
function register(file: { unitName: string; content: string; }) {
837837
if (file.content !== undefined) {
838-
var fileName = ts.normalizeSlashes(file.unitName);
838+
var fileName = ts.normalizePath(file.unitName);
839839
filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, scriptTarget);
840840
}
841841
};
@@ -844,6 +844,7 @@ module Harness {
844844
return {
845845
getCurrentDirectory,
846846
getSourceFile: (fn, languageVersion) => {
847+
fn = ts.normalizePath(fn);
847848
if (Object.prototype.hasOwnProperty.call(filemap, getCanonicalFileName(fn))) {
848849
return filemap[getCanonicalFileName(fn)];
849850
}
@@ -1078,16 +1079,6 @@ module Harness {
10781079
}
10791080
});
10801081

1081-
var filemap: { [name: string]: ts.SourceFile; } = {};
1082-
var register = (file: { unitName: string; content: string; }) => {
1083-
if (file.content !== undefined) {
1084-
var fileName = ts.normalizeSlashes(file.unitName);
1085-
filemap[getCanonicalFileName(fileName)] = createSourceFileAndAssertInvariants(fileName, file.content, options.target, assertInvariants);
1086-
}
1087-
};
1088-
inputFiles.forEach(register);
1089-
otherFiles.forEach(register);
1090-
10911082
var fileOutputs: GeneratedFile[] = [];
10921083

10931084
var programFiles = inputFiles.map(file => file.unitName);

0 commit comments

Comments
 (0)