Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1583 from Xanewok/update-test
Browse files Browse the repository at this point in the history
Update no_default_features test due to new rustc diagnostic format
  • Loading branch information
Xanewok committed Oct 30, 2019
2 parents 5886910 + 20fb334 commit 5db91c7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2084,10 +2084,12 @@ fn client_no_default_features() {

let diag = rls.wait_for_diagnostics();

assert_eq!(diag.diagnostics.len(), 1);
assert_eq!(diag.diagnostics[0].severity, Some(DiagnosticSeverity::Error));
let diagnostics: Vec<_> =
diag.diagnostics.iter().filter(|d| d.severity == Some(DiagnosticSeverity::Error)).collect();
assert_eq!(diagnostics.len(), 1);
assert_eq!(diagnostics[0].severity, Some(DiagnosticSeverity::Error));
let msg = "cannot find struct, variant or union type `Baz` in this scope";
assert!(diag.diagnostics[0].message.contains(msg));
assert!(diagnostics[0].message.contains(msg));
}

#[test]
Expand Down

0 comments on commit 5db91c7

Please sign in to comment.