aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions/qualified_path.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-06-21 14:15:12 +0100
committerGitHub <[email protected]>2021-06-21 14:15:12 +0100
commitc69f762f2673e9b671d91d7b8b110d8481f4ed07 (patch)
treee2d812e08875ef8d1f123e549c8269544bb9842c /crates/ide_completion/src/completions/qualified_path.rs
parent488c9ef9c0c04e0afa291164db5d115d5515b00d (diff)
parent0729913525a55cad3ffe9876c1eb05f7b880d22d (diff)
Merge #9356
9356: internal: Move out and regroup more completion tests r=Veykril a=Veykril bors r+ Co-authored-by: Lukas Wirth <[email protected]>
Diffstat (limited to 'crates/ide_completion/src/completions/qualified_path.rs')
-rw-r--r--crates/ide_completion/src/completions/qualified_path.rs76
1 files changed, 0 insertions, 76 deletions
diff --git a/crates/ide_completion/src/completions/qualified_path.rs b/crates/ide_completion/src/completions/qualified_path.rs
index f5dbd203b..1b8997ecf 100644
--- a/crates/ide_completion/src/completions/qualified_path.rs
+++ b/crates/ide_completion/src/completions/qualified_path.rs
@@ -219,36 +219,6 @@ mod tests {
219 } 219 }
220 220
221 #[test] 221 #[test]
222 fn dont_complete_values_in_type_pos() {
223 check(
224 r#"
225const FOO: () = ();
226static BAR: () = ();
227struct Baz;
228fn foo() {
229 let _: self::$0;
230}
231"#,
232 expect![[r#"
233 st Baz
234 "#]],
235 );
236 }
237
238 #[test]
239 fn dont_complete_enum_variants_in_type_pos() {
240 check(
241 r#"
242enum Foo { Bar }
243fn foo() {
244 let _: Foo::$0;
245}
246"#,
247 expect![[r#""#]],
248 );
249 }
250
251 #[test]
252 fn dont_complete_primitive_in_use() { 222 fn dont_complete_primitive_in_use() {
253 check_builtin(r#"use self::$0;"#, expect![[""]]); 223 check_builtin(r#"use self::$0;"#, expect![[""]]);
254 } 224 }
@@ -259,32 +229,6 @@ fn foo() {
259 } 229 }
260 230
261 #[test] 231 #[test]
262 fn completes_primitives() {
263 check_builtin(
264 r#"fn main() { let _: $0 = 92; }"#,
265 expect![[r#"
266 bt u32
267 bt bool
268 bt u8
269 bt isize
270 bt u16
271 bt u64
272 bt u128
273 bt f32
274 bt i128
275 bt i16
276 bt str
277 bt i64
278 bt char
279 bt f64
280 bt i32
281 bt i8
282 bt usize
283 "#]],
284 );
285 }
286
287 #[test]
288 fn completes_enum_variant() { 232 fn completes_enum_variant() {
289 check( 233 check(
290 r#" 234 r#"
@@ -749,24 +693,4 @@ fn main() {
749 "#]], 693 "#]],
750 ); 694 );
751 } 695 }
752
753 #[test]
754 fn completes_types_and_const_in_arg_list() {
755 check(
756 r#"
757mod foo {
758 pub const CONST: () = ();
759 pub type Type = ();
760}
761
762struct Foo<T>(t);
763
764fn foo(_: Foo<foo::$0>) {}
765"#,
766 expect![[r#"
767 ta Type
768 ct CONST
769 "#]],
770 );
771 }
772} 696}