aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/nameres
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-03-24 08:39:47 +0000
committerAleksey Kladov <[email protected]>2019-03-25 07:52:50 +0000
commit4c4a714328490d7f2626272663827fd51dfab0bd (patch)
tree3f12c6355dfd585e27aa223b3fa5625a0a4fd654 /crates/ra_hir/src/nameres
parentc7ffd939f670a1cba5bf415759b43e63700761a7 (diff)
test diagnostics
Diffstat (limited to 'crates/ra_hir/src/nameres')
-rw-r--r--crates/ra_hir/src/nameres/tests.rs18
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]
557fn 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}