Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/harness/fourslash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,7 @@ namespace FourSlash {

const refs = this.getReferencesAtCaret();
if (refs && refs.length) {
console.log(refs);
this.raiseError("Expected getReferences to fail");
this.raiseError(`Expected getReferences to fail, but saw references: ${stringify(refs)}`);
}
}

Expand All @@ -1050,9 +1049,9 @@ namespace FourSlash {
private assertObjectsEqual<T>(fullActual: T, fullExpected: T, msgPrefix = ""): void {
const recur = <U>(actual: U, expected: U, path: string) => {
const fail = (msg: string) => {
console.log("Expected:", stringify(fullExpected));
console.log("Actual: ", stringify(fullActual));
this.raiseError(`${msgPrefix}At ${path}: ${msg}`);
this.raiseError(`${msgPrefix} At ${path}: ${msg}
Expected: ${stringify(fullExpected)}
Actual: ${stringify(fullActual)}`);
};

if ((actual === undefined) !== (expected === undefined)) {
Expand Down Expand Up @@ -1084,9 +1083,9 @@ namespace FourSlash {
if (fullActual === fullExpected) {
return;
}
console.log("Expected:", stringify(fullExpected));
console.log("Actual: ", stringify(fullActual));
this.raiseError(msgPrefix);
this.raiseError(`${msgPrefix}
Expected: ${stringify(fullExpected)}
Actual: ${stringify(fullActual)}`);
}
recur(fullActual, fullExpected, "");

Expand Down