diff options
Diffstat (limited to 'editors/code/src/test/vscode_diagnostics.test.ts')
-rw-r--r-- | editors/code/src/test/vscode_diagnostics.test.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/editors/code/src/test/vscode_diagnostics.test.ts b/editors/code/src/test/vscode_diagnostics.test.ts index ca4345626..9c5d812fa 100644 --- a/editors/code/src/test/vscode_diagnostics.test.ts +++ b/editors/code/src/test/vscode_diagnostics.test.ts | |||
@@ -35,6 +35,24 @@ describe('areDiagnosticsEqual', () => { | |||
35 | assert(areDiagnosticsEqual(diagnostic1, diagnostic2)); | 35 | assert(areDiagnosticsEqual(diagnostic1, diagnostic2)); |
36 | }); | 36 | }); |
37 | 37 | ||
38 | it('should treat diagnostics with different sources as inequal', () => { | ||
39 | const diagnostic1 = new vscode.Diagnostic( | ||
40 | range1, | ||
41 | 'Hello, world!', | ||
42 | vscode.DiagnosticSeverity.Error | ||
43 | ); | ||
44 | diagnostic1.source = 'rustc'; | ||
45 | |||
46 | const diagnostic2 = new vscode.Diagnostic( | ||
47 | range1, | ||
48 | 'Hello, world!', | ||
49 | vscode.DiagnosticSeverity.Error | ||
50 | ); | ||
51 | diagnostic2.source = 'clippy'; | ||
52 | |||
53 | assert(!areDiagnosticsEqual(diagnostic1, diagnostic2)); | ||
54 | }); | ||
55 | |||
38 | it('should treat diagnostics with different ranges as inequal', () => { | 56 | it('should treat diagnostics with different ranges as inequal', () => { |
39 | const diagnostic1 = new vscode.Diagnostic( | 57 | const diagnostic1 = new vscode.Diagnostic( |
40 | range1, | 58 | range1, |