diff options
Diffstat (limited to 'crates/libanalysis/tests')
-rw-r--r-- | crates/libanalysis/tests/tests.rs | 13 |
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] |
82 | fn 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] | ||
82 | fn test_resolve_parent_module() { | 95 | fn 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())); |