Skip to content

Commit 7d65b5b

Browse files
committed
Merge pull request microsoft#5697 from Microsoft/harnessCleanup3_WIP
cleanup harness code (part 3)
2 parents a30d9c2 + 31bce22 commit 7d65b5b

8 files changed

Lines changed: 944 additions & 981 deletions

src/harness/fourslash.ts

Lines changed: 678 additions & 271 deletions
Large diffs are not rendered by default.

src/harness/fourslashRunner.ts

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -58,56 +58,6 @@ class FourSlashRunner extends RunnerBase {
5858
}
5959
});
6060
});
61-
62-
describe("Generate Tao XML", () => {
63-
const invalidReasons: any = {};
64-
FourSlash.xmlData.forEach(xml => {
65-
if (xml.invalidReason !== null) {
66-
invalidReasons[xml.invalidReason] = (invalidReasons[xml.invalidReason] || 0) + 1;
67-
}
68-
});
69-
const invalidReport: { reason: string; count: number }[] = [];
70-
for (const reason in invalidReasons) {
71-
if (invalidReasons.hasOwnProperty(reason)) {
72-
invalidReport.push({ reason: reason, count: invalidReasons[reason] });
73-
}
74-
}
75-
invalidReport.sort((lhs, rhs) => lhs.count > rhs.count ? -1 : lhs.count === rhs.count ? 0 : 1);
76-
77-
const lines: string[] = [];
78-
lines.push("<!-- Blocked Test Report");
79-
invalidReport.forEach((reasonAndCount) => {
80-
lines.push(reasonAndCount.count + " tests blocked by " + reasonAndCount.reason);
81-
});
82-
lines.push("-->");
83-
lines.push("<TaoTest xmlns=\"http://microsoft.com/schemas/VSLanguages/TAO\">");
84-
lines.push(" <InitTest>");
85-
lines.push(" <StartTarget />");
86-
lines.push(" </InitTest>");
87-
lines.push(" <ScenarioList>");
88-
FourSlash.xmlData.forEach(xml => {
89-
if (xml.invalidReason !== null) {
90-
lines.push("<!-- Skipped " + xml.originalName + ", reason: " + xml.invalidReason + " -->");
91-
}
92-
else {
93-
lines.push(" <Scenario Name=\"" + xml.originalName + "\">");
94-
xml.actions.forEach(action => {
95-
lines.push(" " + action);
96-
});
97-
lines.push(" </Scenario>");
98-
}
99-
});
100-
lines.push(" </ScenarioList>");
101-
lines.push(" <CleanupScenario>");
102-
lines.push(" <CloseAllDocuments />");
103-
lines.push(" <CleanupCreatedFiles />");
104-
lines.push(" </CleanupScenario>");
105-
lines.push(" <CleanupTest>");
106-
lines.push(" <CloseTarget />");
107-
lines.push(" </CleanupTest>");
108-
lines.push("</TaoTest>");
109-
Harness.IO.writeFile("built/local/fourslash.xml", lines.join("\r\n"));
110-
});
11161
});
11262
}
11363
}

tests/cases/fourslash/completionBeforeSemanticDiagnosticsInArrowFunction1.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
//// var f4 = <T>(x: T/**/ ) => {
44
//// }
55

6-
fs.goTo.marker();
6+
goTo.marker();
77

88
// Replace the "T" type with the non-existent type 'V'.
9-
fs.edit.backspace(1);
10-
fs.edit.insert("A");
9+
edit.backspace(1);
10+
edit.insert("A");
1111

1212
// Bring up completion to force a pull resolve. This will end up resolving several symbols and
1313
// producing unreported diagnostics (i.e. that 'V' wasn't found).
14-
fs.verify.completionListContains("T");
15-
fs.verify.completionEntryDetailIs("T", "(type parameter) T in <T>(x: any): void");
14+
verify.completionListContains("T");
15+
verify.completionEntryDetailIs("T", "(type parameter) T in <T>(x: any): void");
1616

1717
// There should now be a single error.
18-
fs.verify.numberOfErrorsInCurrentFile(1);
18+
verify.numberOfErrorsInCurrentFile(1);

0 commit comments

Comments
 (0)