diff options
author | Aleksey Kladov <[email protected]> | 2019-03-24 08:39:47 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-03-25 07:52:50 +0000 |
commit | 4c4a714328490d7f2626272663827fd51dfab0bd (patch) | |
tree | 3f12c6355dfd585e27aa223b3fa5625a0a4fd654 /crates/ra_hir/src/nameres | |
parent | c7ffd939f670a1cba5bf415759b43e63700761a7 (diff) |
test diagnostics
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r-- | crates/ra_hir/src/nameres/tests.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/crates/ra_hir/src/nameres/tests.rs b/crates/ra_hir/src/nameres/tests.rs index ac9b88520..277b0757c 100644 --- a/crates/ra_hir/src/nameres/tests.rs +++ b/crates/ra_hir/src/nameres/tests.rs | |||
@@ -552,3 +552,21 @@ foo: v | |||
552 | "### | 552 | "### |
553 | ); | 553 | ); |
554 | } | 554 | } |
555 | |||
556 | #[test] | ||
557 | fn unresolved_module_diagnostics() { | ||
558 | let diagnostics = MockDatabase::with_files( | ||
559 | r" | ||
560 | //- /lib.rs | ||
561 | mod foo; | ||
562 | mod bar; | ||
563 | //- /foo.rs | ||
564 | ", | ||
565 | ) | ||
566 | .diagnostics(); | ||
567 | |||
568 | assert_snapshot_matches!(diagnostics, @r###" | ||
569 | "mod bar;": unresolved module | ||
570 | "### | ||
571 | ); | ||
572 | } | ||