aboutsummaryrefslogtreecommitdiff
path: root/crates/libanalysis/tests/tests.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-28 18:29:36 +0100
committerAleksey Kladov <[email protected]>2018-08-28 18:29:36 +0100
commitb00a4d43ecd4af49a2870718a9d5b8d49084a285 (patch)
tree865f970d2d409bd17566d32a6b5e33eefa27ffe8 /crates/libanalysis/tests/tests.rs
parent4c1f17af7d0085636434a8bc85e62434eb128516 (diff)
Dont diagnose inline mods
Diffstat (limited to 'crates/libanalysis/tests/tests.rs')
-rw-r--r--crates/libanalysis/tests/tests.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/libanalysis/tests/tests.rs b/crates/libanalysis/tests/tests.rs
index e378ab986..e05aa8895 100644
--- a/crates/libanalysis/tests/tests.rs
+++ b/crates/libanalysis/tests/tests.rs
@@ -79,6 +79,19 @@ fn test_unresolved_module_diagnostic() {
79} 79}
80 80
81#[test] 81#[test]
82fn test_unresolved_module_diagnostic_no_diag_for_inline_mode() {
83 let mut world = WorldState::new();
84 world.change_file(FileId(1), Some("mod foo {}".to_string()));
85
86 let snap = world.snapshot(FileMap(&[(1, "/lib.rs")]));
87 let diagnostics = snap.diagnostics(FileId(1)).unwrap();
88 assert_eq_dbg(
89 r#"[]"#,
90 &diagnostics,
91 );
92}
93
94#[test]
82fn test_resolve_parent_module() { 95fn test_resolve_parent_module() {
83 let mut world = WorldState::new(); 96 let mut world = WorldState::new();
84 world.change_file(FileId(1), Some("mod foo;".to_string())); 97 world.change_file(FileId(1), Some("mod foo;".to_string()));