aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/doc_tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/doc_tests')
-rw-r--r--crates/ra_assists/src/doc_tests/generated.rs52
1 files changed, 52 insertions, 0 deletions
diff --git a/crates/ra_assists/src/doc_tests/generated.rs b/crates/ra_assists/src/doc_tests/generated.rs
index 43fa159d7..d390db33c 100644
--- a/crates/ra_assists/src/doc_tests/generated.rs
+++ b/crates/ra_assists/src/doc_tests/generated.rs
@@ -203,3 +203,55 @@ fn handle(action: Action) {
203"#####, 203"#####,
204 ) 204 )
205} 205}
206
207#[test]
208fn doctest_flip_binexpr() {
209 check(
210 "flip_binexpr",
211 r#####"
212fn main() {
213 let _ = 90 +<|> 2;
214}
215"#####,
216 r#####"
217fn main() {
218 let _ = 2 + 90;
219}
220"#####,
221 )
222}
223
224#[test]
225fn doctest_flip_comma() {
226 check(
227 "flip_comma",
228 r#####"
229fn main() {
230 ((1, 2),<|> (3, 4));
231}
232"#####,
233 r#####"
234fn main() {
235 ((3, 4), (1, 2));
236}
237"#####,
238 )
239}
240
241#[test]
242fn doctest_inline_local_variable() {
243 check(
244 "inline_local_variable",
245 r#####"
246fn main() {
247 let x<|> = 1 + 2;
248 x * 4;
249}
250"#####,
251 r#####"
252fn main() {
253 (1 + 2) * 4;
254}
255"#####,
256 )
257}