You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert.Fail(string.Format("Mismatch between number of diagnostics returned, expected \"{0}\" actual \"{1}\"\r\n\r\nDiagnostics:\r\n{2}\r\n",expectedCount,actualCount,diagnosticsOutput));
126
-
}
120
+
Assert.AreEqual(expectedCount,actualCount,$"Mismatch between number of diagnostics returned, expected \"{expectedCount}\" actual \"{actualCount}\"\r\n\r\nDiagnostics:\r\n{(actualResults.Any()?FormatDiagnostics(analyzer,actualResults.ToArray()):"NONE.")}\r\n");
$"Expected {expected.Locations.Length-1} additional locations but got {additionalLocations.Length} for Diagnostic:\r\n{FormatDiagnostics(analyzer,actual)}\r\n");
$"Expected diagnostic severity to be \"{expected.Severity}\" was \"{actual.Severity}\"\r\n\r\nDiagnostic:\r\n{FormatDiagnostics(analyzer,actual)}\r\n");
164
154
165
-
if(actual.Severity!=expected.Severity)
166
-
{
167
-
Assert.Fail(string.Format("Expected diagnostic severity to be \"{0}\" was \"{1}\"\r\n\r\nDiagnostic:\r\n {2}\r\n",
"Expected diagnostic message to be \"{expected.Message}\" was \"{actual.GetMessage()}\"\r\n\r\nDiagnostic:\r\n {FormatDiagnostics(analyzer, actual)}\r\n");
$"Expected diagnostic to be on line \"{expected.Line}\" was actually on line \"{actualLinePosition.Line+1}\"\r\n\r\nDiagnostic:\r\n{FormatDiagnostics(analyzer,diagnostic)}\r\n");
206
186
}
207
187
208
188
// Only check column position if there is an actual column position in the real diagnostic
"Expected diagnostic to start at column \"{expected.Column}\" was actually at column \"{actualLinePosition.Character + 1}\"\r\n\r\nDiagnostic:\r\n {FormatDiagnostics(analyzer, diagnostic)}\r\n");
0 commit comments