From b9d85f55b7a0a2159971b42bb5dae71efbfeada4 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 21 Jun 2021 14:59:49 +0200 Subject: Move out completion type position tests --- .../src/completions/qualified_path.rs | 76 ---------------------- 1 file changed, 76 deletions(-) (limited to 'crates/ide_completion/src/completions/qualified_path.rs') 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 @@ -218,36 +218,6 @@ mod tests { expect.assert_eq(&actual); } - #[test] - fn dont_complete_values_in_type_pos() { - check( - r#" -const FOO: () = (); -static BAR: () = (); -struct Baz; -fn foo() { - let _: self::$0; -} -"#, - expect![[r#" - st Baz - "#]], - ); - } - - #[test] - fn dont_complete_enum_variants_in_type_pos() { - check( - r#" -enum Foo { Bar } -fn foo() { - let _: Foo::$0; -} -"#, - expect![[r#""#]], - ); - } - #[test] fn dont_complete_primitive_in_use() { check_builtin(r#"use self::$0;"#, expect![[""]]); @@ -258,32 +228,6 @@ fn foo() { check_builtin(r#"fn foo() { self::$0 }"#, expect![[""]]); } - #[test] - fn completes_primitives() { - check_builtin( - r#"fn main() { let _: $0 = 92; }"#, - expect![[r#" - bt u32 - bt bool - bt u8 - bt isize - bt u16 - bt u64 - bt u128 - bt f32 - bt i128 - bt i16 - bt str - bt i64 - bt char - bt f64 - bt i32 - bt i8 - bt usize - "#]], - ); - } - #[test] fn completes_enum_variant() { check( @@ -749,24 +693,4 @@ fn main() { "#]], ); } - - #[test] - fn completes_types_and_const_in_arg_list() { - check( - r#" -mod foo { - pub const CONST: () = (); - pub type Type = (); -} - -struct Foo(t); - -fn foo(_: Foo) {} -"#, - expect![[r#" - ta Type - ct CONST - "#]], - ); - } } -- cgit v1.2.3