diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-02 17:13:06 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-01-02 17:13:06 +0000 |
commit | 54efd8204ec05313007d42351fe4701061b06a67 (patch) | |
tree | 1dc7bdb2cf040843dd552661bfc2225e3679eb5a /crates/ra_analysis/tests | |
parent | 4f30c459336e948790910e268d8f751b95815ac2 (diff) | |
parent | 28f6eedba59d3a5dd43fe6fbde3d19d54d0e2f9d (diff) |
Merge #407
407: run r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_analysis/tests')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 845fff3c6..3045c2e78 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -132,56 +132,6 @@ fn test_resolve_parent_module_for_inline() { | |||
132 | } | 132 | } |
133 | 133 | ||
134 | #[test] | 134 | #[test] |
135 | fn test_path_one_layer() { | ||
136 | let (analysis, pos) = analysis_and_position( | ||
137 | " | ||
138 | //- /lib.rs | ||
139 | mod foo; | ||
140 | //- /foo/mod.rs | ||
141 | mod bla; | ||
142 | //- /foo/bla.rs | ||
143 | <|> //empty | ||
144 | ", | ||
145 | ); | ||
146 | let symbols = analysis.module_path(pos).unwrap().unwrap(); | ||
147 | assert_eq!("foo::bla", &symbols); | ||
148 | } | ||
149 | |||
150 | #[test] | ||
151 | fn test_path_two_layer() { | ||
152 | let (analysis, pos) = analysis_and_position( | ||
153 | " | ||
154 | //- /lib.rs | ||
155 | mod foo; | ||
156 | //- /foo/mod.rs | ||
157 | mod bla; | ||
158 | //- /foo/bla/mod.rs | ||
159 | mod more; | ||
160 | //- /foo/bla/more.rs | ||
161 | <|> //empty | ||
162 | ", | ||
163 | ); | ||
164 | let symbols = analysis.module_path(pos).unwrap().unwrap(); | ||
165 | assert_eq!("foo::bla::more", &symbols); | ||
166 | } | ||
167 | |||
168 | #[test] | ||
169 | fn test_path_in_file_mod() { | ||
170 | let (analysis, pos) = analysis_and_position( | ||
171 | " | ||
172 | //- /lib.rs | ||
173 | mod foo; | ||
174 | //- /foo.rs | ||
175 | mod bar { | ||
176 | <|> //empty | ||
177 | } | ||
178 | ", | ||
179 | ); | ||
180 | let symbols = analysis.module_path(pos).unwrap().unwrap(); | ||
181 | assert_eq!("foo::bar", &symbols); | ||
182 | } | ||
183 | |||
184 | #[test] | ||
185 | fn test_resolve_crate_root() { | 135 | fn test_resolve_crate_root() { |
186 | let mock = MockAnalysis::with_files( | 136 | let mock = MockAnalysis::with_files( |
187 | " | 137 | " |