From f835279b3ae41644e9568187b4468cd9d9e84eca Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 21 Jun 2021 13:48:25 +0200 Subject: Move out completion pattern tests --- .../src/completions/unqualified_path.rs | 50 ---------------------- 1 file changed, 50 deletions(-) (limited to 'crates/ide_completion/src/completions/unqualified_path.rs') diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 81c4fb305..819fa3a43 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs @@ -134,56 +134,6 @@ fn foo() { ); } - #[test] - fn bind_pat_and_path_ignore_at() { - check( - r#" -enum Enum { A, B } -fn quux(x: Option) { - match x { - None => (), - Some(en$0 @ Enum::A) => (), - } -} -"#, - expect![[r#""#]], - ); - } - - #[test] - fn bind_pat_and_path_ignore_ref() { - check( - r#" -enum Enum { A, B } -fn quux(x: Option) { - match x { - None => (), - Some(ref en$0) => (), - } -} -"#, - expect![[r#""#]], - ); - } - - #[test] - fn bind_pat_and_path() { - check( - r#" -enum Enum { A, B } -fn quux(x: Option) { - match x { - None => (), - Some(En$0) => (), - } -} -"#, - expect![[r#" - en Enum - "#]], - ); - } - #[test] fn completes_bindings_from_let() { check( -- cgit v1.2.3 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/unqualified_path.rs | 97 ---------------------- 1 file changed, 97 deletions(-) (limited to 'crates/ide_completion/src/completions/unqualified_path.rs') diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 819fa3a43..380c1e079 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs @@ -112,28 +112,6 @@ mod tests { expect.assert_eq(&actual) } - #[test] - fn dont_complete_values_in_type_pos() { - check( - r#" -const FOO: () = (); -static BAR: () = (); -enum Foo { - Bar -} -struct Baz; -fn foo() { - let local = (); - let _: $0; -} -"#, - expect![[r#" - en Foo - st Baz - "#]], - ); - } - #[test] fn completes_bindings_from_let() { check( @@ -238,29 +216,6 @@ fn main() { ); } - #[test] - fn completes_generic_params_in_struct() { - check( - r#"struct S { x: $0}"#, - expect![[r#" - sp Self - tp T - st S<…> - "#]], - ); - } - - #[test] - fn completes_self_in_enum() { - check( - r#"enum X { Y($0) }"#, - expect![[r#" - sp Self - en X - "#]], - ); - } - #[test] fn completes_module_items() { check( @@ -314,19 +269,6 @@ mod m { ); } - #[test] - fn completes_return_type() { - check( - r#" -struct Foo; -fn x() -> $0 -"#, - expect![[r#" - st Foo - "#]], - ); - } - #[test] fn dont_show_both_completions_for_shadowing() { check( @@ -508,19 +450,6 @@ fn foo() { $0 } ); } - #[test] - fn completes_macros_as_type() { - check( - r#" -macro_rules! foo { () => {} } -fn main() { let x: $0 } -"#, - expect![[r#" - ma foo!(…) macro_rules! foo - "#]], - ); - } - #[test] fn completes_macros_as_stmt() { check( @@ -666,30 +595,4 @@ fn f() {} expect![[""]], ) } - - #[test] - fn completes_types_and_const_in_arg_list() { - check( - r#" -enum Bar { - Baz -} -trait Foo { - type Bar; -} - -const CONST: () = (); - -fn foo, const CONST_PARAM: usize>(_: T) {} -"#, - expect![[r#" - ta Bar = type Bar; - tp T - cp CONST_PARAM - tt Foo - en Bar - ct CONST - "#]], - ); - } } -- cgit v1.2.3