File tree Expand file tree Collapse file tree 1 file changed +66
-0
lines changed
crates/ide_completion/src/tests Expand file tree Collapse file tree 1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,72 @@ fn after_target_name_in_impl() {
8080 check ( r"impl Trait for Type $0" , expect ! [ [ r#""# ] ] ) ;
8181}
8282
83+ #[ test]
84+ fn after_struct_name ( ) {
85+ // FIXME: This should emit `kw where` only
86+ check (
87+ r"struct Struct $0" ,
88+ expect ! [ [ r##"
89+ kw pub(crate)
90+ kw pub
91+ kw unsafe
92+ kw fn
93+ kw const
94+ kw type
95+ kw impl
96+ kw extern
97+ kw use
98+ kw trait
99+ kw static
100+ kw mod
101+ kw enum
102+ kw struct
103+ kw union
104+ sn tmod (Test module)
105+ sn tfn (Test function)
106+ sn macro_rules
107+ kw self
108+ kw super
109+ kw crate
110+ md module
111+ ma makro!(…) #[macro_export] macro_rules! makro
112+ "## ] ] ,
113+ ) ;
114+ }
115+
116+ #[ test]
117+ fn after_fn_name ( ) {
118+ // FIXME: This should emit `kw where` only
119+ check (
120+ r"fn func() $0" ,
121+ expect ! [ [ r##"
122+ kw pub(crate)
123+ kw pub
124+ kw unsafe
125+ kw fn
126+ kw const
127+ kw type
128+ kw impl
129+ kw extern
130+ kw use
131+ kw trait
132+ kw static
133+ kw mod
134+ kw enum
135+ kw struct
136+ kw union
137+ sn tmod (Test module)
138+ sn tfn (Test function)
139+ sn macro_rules
140+ kw self
141+ kw super
142+ kw crate
143+ md module
144+ ma makro!(…) #[macro_export] macro_rules! makro
145+ "## ] ] ,
146+ ) ;
147+ }
148+
83149#[ test]
84150fn before_record_field ( ) {
85151 check (
You can’t perform that action at this time.
0 commit comments