1 //! Completion tests for item list position.
2 use expect_test
::{expect, Expect}
;
4 use crate::tests
::{check_edit, completion_list, BASE_ITEMS_FIXTURE}
;
6 fn check(ra_fixture
: &str, expect
: Expect
) {
7 let actual
= completion_list(&format
!("{BASE_ITEMS_FIXTURE}{ra_fixture}"));
8 expect
.assert_eq(&actual
)
12 fn in_mod_item_list() {
14 r
#"mod tests { $0 }"#,
16 ma makro!(…) macro_rules! makro
37 sn tfn (Test function)
44 fn in_source_file_item_list() {
48 ma makro!(…) macro_rules! makro
69 sn tfn (Test function)
76 fn in_item_list_after_attr() {
80 ma makro!(…) macro_rules! makro
101 sn tfn (Test function)
102 sn tmod (Test module)
108 fn in_qualified_path() {
112 ma makro!(…) macro_rules! makro
119 fn after_unsafe_token() {
131 fn after_visibility() {
152 fn after_visibility_unsafe() {
163 fn in_impl_assoc_item_list() {
165 r
#"impl Struct { $0 }"#,
167 ma makro!(…) macro_rules! makro
182 fn in_impl_assoc_item_list_after_attr() {
184 r
#"impl Struct { #[attr] $0 }"#,
186 ma makro!(…) macro_rules! makro
201 fn in_trait_assoc_item_list() {
205 ma makro!(…) macro_rules! makro
218 fn in_trait_impl_assoc_item_list() {
232 const CONST0: () = ();
238 ct const CONST1: () =
240 ma makro!(…) macro_rules! makro
250 fn after_unit_struct() {
254 ma makro!(…) macro_rules! makro
275 sn tfn (Test function)
276 sn tmod (Test module)
282 fn type_in_impl_trait() {
330 type O: ?Sized = u32;
339 type O: ?Sized = u32;